Howdy, Stranger!

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

Colored text isn't showing properly in the game? (Harlowe)

I'm writing a story with multiple characters, and I've been using basic HTML (as in <font color = "#hexcode"> html) in order to change the font colors.

There's a problem, though - I can't make the text red, which I need to do for one of my characters. Whenever I try to input the code, it turns the text green instead - #980000, the desired color, shows up as #38761d (another character's color, who appears later in the story); and when I tried to make the text bright red, it showed up as neon green instead.

I'm not experienced with HTML, so I have no clue what's going wrong. Can anyone help?

(This was reposted from an earlier discussion, from about a month ago - I forgot to set it as a question, and it got no responses anyway.)


  • First. You should not be using the <font> tag. It's been deprecated since HTML 4.01 (December 1999) and obsoleted since HTML5 (October 2014).

    You should either be using proper HTML markup or Harlowe's (color:) macro.

    If you wanted to use HTML markup, the way to do that would be something like the following:
    <span style="color: #980000">some red text</span>

    Though I'd recommend defining a class style based on the character's name and use that. For example: (goes in Story Stylesheet)
    .steve {
    	color: #980000;
    <span class="steve">some red text</span>

    Alternatively, using the (color:) macro would look like the following:
    (color: "#980000")[some red text]
  • you could also use named hooks combined with a little CSS to do what you want.

    1. example passage text:
    |john>[Hi my name is John.]
    |jane>[Hi John, my name is Jane.]
    |john>[Do you like pizza, and if so would you like to eat one with me?]
    |jane>[I would love to eat some pizza with you.]

    2. example CSS to style each character:
    tw-hook[name="john"] {
      color: #980000;
    tw-hook[name="jane"] {
      color: #38761d;
  • Thank you both! I wasn't aware that the tag was outdated, I guess I must've been using an equally outdated tutorial without realizing it.

    I'll probably be going with Exile's class style suggestion for now, but I'll keep the named hooks in mind as well.
  • Either will work, so my suggestion would be to use whatever fits you best.

    I went with classes because that's the first thing I thought of and it works in all story formats.

    Using named hooks, as greyelf suggests, is probably the more idiomatic way to do it in Harlowe—bit shorter as well. As a bonus, any of Harlowe's macros that target hooks would be usable on them, so that's another possible consideration in favor of using the hook method.
Sign In or Register to comment.