Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Colouring Text

All string printing functions in Naev accept special combinations to change the colour. This will work whenever the string is shown to the player. In particular, the character # is used for a prefix to set the colour of text in a string. The colour is determined by the character after #. In particular, the following are valid values:

SymbolDescription
#0Resets colour to the default value.
#rRed colour.
#gGreen colour.
#bBlue colour.
#oOrange colour.
#yYellow colour.
#wWhite colour.
#pPurple colour.
#nGrey colour.
#FColour indicating friend.
#HColour indicating hostile.
#NColour indicating neutral.
#IColour indicating inert.
#RColour indicating restricted.

Multiple colours can be used in a string such as "It is a #ggood#0 #rmonday#0!". In this case, the word "good" is shown in green, and "monday" is shown in red. The rest of the text will be shown in the default colour.

While it is possible to accent and emphasize text with this, it is important to not go too overboard, as it can difficult translating. When possible, it is also best to put the colour outside the string being translated. For example _("#rred#0") should be written as "#r".._("red").."#0".