Font colour

From Naevwiki
Jump to: navigation, search


The font rendering system in Naev supports escape codes, this allows different colours to be used. They are activated by escape codes.


To use them in C you just need to use the escape char '\e': "This is \erRed\e0.".


Lua doesn't support escape chars like C so you have to use \027: "This is \027rRed\0270.".


Basic Codes

These are lower case.

  • r: Red.
  • g: Green.
  • b: Blue.
  • y: Yellow.
  • w: White.
  • p: Purple.
  • n: Black.

Advanced Codes

These are upper case.

  • F: Friendly colour.
  • H: Hostile colour.
  • N: Neutral colour.
  • I: Inert colour.
  • M: Neutral map colour.
  • C: Console colour.
  • D: Dark console colour.
  • 0: Reset to base colour.