+1 vote
by (510 points)
So I plan to have character dialogue be colored, just to add some extra flavor and to help with keeping track of who is speaking in dialogues. This would be fine but rather than using the default "red" and "green" I have picked hex-based colors that are a bit easier to read without straining the eyes too much. All should be just swell in Twine-town except that there's going to be quite a bit of dialogue and having to type out, for example, "@@color(#5c9cff):" every time that particular character speaks.

What I'd like to know is a way to make a shortcut. I tried using widgets but they do not seem to work with text formatting, at least not colors. Even something as simple as setting a nickname for that specific color (#5c9cff) so whenever I type "@@color(nickname): it will use that color. Much easier to remember nicknames than it is a random string of numbers and letters. Thanks in advance.

1 Answer

0 votes
by (510 points)
 
Best answer

I just barely answered my own question. For those that also would like to know this, if you Edit your Story Stylesheet you can define shortcuts ahead of time. For instance putting:

.bl {
  color:#5c9cff;
  }

In the stylesheet will make it so when you want to use that color, you just need to type:

@@.bl;Your text here@@

and it will have the desired effect.

by (159k points)

You may want to name your CSS selectors after the story characters, it helps remember who's who.

.john {
	color:#5c9cff;
}
.jane {
	color: blue;
}

... then you can use that name within the passage.

@@.john;Your text here@@

@@.jane;Your text here@@

 

...