Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Colors not working?

Okay, so I've been trying to do this for ages, and it's a minor detail, but it's really getting frustrating. I can't seem to change the background color, or some other colors, of my game.

It works on Twine fine - I playtest the game and everything's the right color. But on my neocities site, where the code is the same, everything's default color. Well, I think the passage color is the right color. But instead of being black, the background is white, and the links are default blue instead of magenta. (I think I'm gonna change my color scheme, but after I figure out how to make it change at all.)

I'm sure this is an easy fix, but I'm really bad at coding! I'm really afraid to touch those big walls of text in case I break something. All I wanted was to make a little story.

My site is candlelitgame.neocities.org (it's not done yet, I just uploaded a "beta" so I could see if it worked) and attached are: A screenshot of what it's supposed to look like, and a screenshot of what it does look like. I feel really nervous about posting all my code, though..? Gosh, I feel dumb...

Comments

  • The CSS in the Story Stylesheet area of your website is invalid, it looks like the following:
    {
      font-family: Palatino;
      font-size: 12px;
      
    html {
      background-color: #000000;
    }
     
    tw-passage
    {
      color: #3b532d;
    }
    
    tw-link
    {
      color: #800040;
      }
    

    Harlowe sets the default font-family and foreground/background colours against the html element; and the default font-size against the tw-story element.
    Based on that information your CSS should look more like:
    html {
    	font-family: Palatino;
    	background-color: #000000;
    	color: #3b532d;
    }
    tw-story {
    	/* the following is roughly 12px in em units. */
    	font-size: 0.75em;
    }
    tw-link {
    	color: #800040;
    }
    
    ... although personally I would not decrease Harlowe's default font size of 1.5em because it will make it harder to read the text in the passage.
  • @greyelf Oh, wait. I clicked "did this answer" before I tried that code out. Doesn't seem to be working. Dunno why!
  • Oh, whoop, it's working now. Still dunno why! But it is working!
Sign In or Register to comment.