Howdy, Stranger!

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

Text Colour/Background colour

So, when I upload the game I made, the background colour is black and so is the text colour (that isn't linked) So, can someone tell me how to either make the text white or the background white??

(2.0.10 Harlowe)

Comments

  • Harlowe's default background (transparent) and foreground (black) colours are set against the html element like so:
    html {
    	background-color: transparent;
    	color: #000;
    }
    

    If you want to hard-wire the colours to be white text on a black background then place the following at the top of your Story Stylesheet:
    html {
    	background-color: #000;
    	color: #FFF;
    }
    
    note: the above may not work correctly if you have other custom CSS that also modified foreground/background colours.
  • So, I did this: http://prntscr.com/98gcqt

    What am I doing wrong ;_;?
  • kingoo1 wrote: »
    So, I did this: http://prntscr.com/98gcqt

    What am I doing wrong ;_;?


    Ugh..I'm dumb. Nvm xD
  • The Adding Custom CSS and Change the Font, Colors, or Appearance sections of the Twine 2 Guide explains how to edit your story's stylesheet.

    eg. Use the Edit Story Stylesheet menu option to access the correct area.
  • edited November 2015
    When I changed the font and background for my sugarcube game, I used body, rather than html.
    body {background-color: #000; color: #eee; font-family: Arial; font-size: 14px; }
    
  • edited November 2015
    kingoo1 wrote: »
    What am I doing wrong ;_;?

    You're adding the code to the wrong place, that's what.

    You don't add the code to the passage, you add it to the CSS. Bottom of the screen on the grid layout, next to the title of your game, is an arrow pointing upwards. Click that and choose 'Edit story style sheet'.

  • Jud_Casper wrote: »
    When I changed the font and background for my sugarcube game, I used body, rather than html.
    Due to the current structure of the HTML template Harlowe uses the tw-story element is not a child of the body element so CSS applied to the body may not be inherited by tw-story.
  • Ah! In that case go with html.

    His main problem, however, was that he added your solution to the passage itself, and not the CSS.
  • Jud_Casper wrote: »
    His main problem, however, was that he added your solution to the passage itself, and not the CSS.
    Which is why I later supplied them with links to the Twine 2 Guide. *smile*
  • edited November 2015
    greyelf wrote: »
    Jud_Casper wrote: »
    His main problem, however, was that he added your solution to the passage itself, and not the CSS.
    Which is why I later supplied them with links to the Twine 2 Guide. *smile*
    Maybe we have different teaching techniques :)

    You seem to be of the ilk that encourages a person to teach themselves. I just tell them the answer there and then if I know it.

    I know you did this to some extent, but he clearly didn't know where CSS needed to be added.

  • You seem to be of the ilk that encourages a person to teach themselves.
    I try to encourage people to use all the resources available to them and to learn how to use a tool. eg. Documentation, Search and the Forums.

    I could of written out step by step instructions on how to edit the stylesheet area of a Twine 2 story project, which would of looked similar to the instructions found in the Guide.
    By linking to the Guide I hoped to achieve two things: give them the instructions they needed; and make them aware that the Guide exists.
  • Yes, fair point. Your method is better.
Sign In or Register to comment.