![]() ![]() I’ve made those numbers random (and set them to refresh once per second) to make the effect clear in the example, but you could just as easily use variables that are already significant to your game. This example uses a (live:) macro ( which are covered in a different tutorial), but the basic idea is very simple: $randomRed, $randomGreen and $randomBlue are all variables representing a number from 0 to 255. The real reason you might want to step beyond those 140 named colours and use the rgb method is that the numbers can be provided by variables. However, the 140 named colours really should be enough for anyone when it comes to formatting in-game text. ![]() This site lets you see what different combinations look like before you type them into Twine. By specifying numbers in this way, you can create any colour you like. It means: “as much red as possible, no green, no blue.” For comparison, (rgb: 0, 0, 0) would be black (no colour), while (rgb: 255, 255, 255) would be white (all three colours lit up as bright as possible on screen). 0 is the minimum and 255 is the maximum so (text-colour: (rgb: 255, 0, 0)) does exactly the same thing as (text-colour: “red” ). Rgb stands for red, green, blue, with the numbers 255, 0, 0 dictating how much of each the computer should add to the mix. Advanced text colour:Įarlier on I mentioned that if you wanted to produce a colour not on this list, there would be ways of doing that. This is probably enough for anyone, but if you want to include one that isn’t in there (or sufficiently similar to one that is), there are several ways to manually pick any colour that you like. 140, in fact: here’s a list of all of them. ![]() There are a lot of options when it comes to colours you can just write in like this. This is obviously unhelpful for drawing attention to it, but can be useful under other circumstances. Note that (text-colour: “transparent”) will essentially turn anything you write invisible. Essentially, you write something like this: The easiest way to change the colour of your text is with the (text-colour:) macro. This post will only go into marginally more detail, but will also link to some handy external resources so do pop back if you get stuck. In fact, this tutorial is so simple that you can probably just glance through the example story, Snazzy Susan and the Majestic Markup, which will contain most of the following information (as well as a few examples of how to style text in other ways). If all you want to do is change the colour of specific bits of text in Twine, this tutorial will help you do just that. ![]() If you’re unfamiliar with Twine, you might like to familiarise yourself with it using this tutorial which will get you started in just four clicks – and possibly take a glance at some of the others in the series – but many of the following techniques will be very straightforward. If you’re dealing with important information – whether that’s a particularly significant word or phrase, or a stat the player must recognise at a glance – then it helps to format it in some way that immediately sets it apart from the rest of the text on screen. Colouring text in Twine is incredibly simple, but also incredibly useful. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |