Yaml Data Color Codes - Dungeons-of-Kathallion/Bane-Of-Wargs GitHub Wiki


The Yaml Data Color Code is a list of special text code, similar to the text replacements.

The difference with the text replacements, is that the yaml data color codes are not associated with values, but with ANSI escape codes. They are used in map zone illustrations, dialog scenes or npcs, mounts, enemies and finally items thumbnails.

These special text code all begin with a $ character, followed by a color name; that will be replaced when displayed by a color. When using a color code, it will be applied to every following characters, even ones on next lines, until you use an other code. Note that depending on the player's terminal theme/colors, colors won't be displayed the same as you. Hint: use $WHITE to reset the color.

Color Codes

Text Code Corresponding ANSI Escape Code
$RED \033[0;31m
$GREEN \033[0;32m
$YELLOW \033[0;33m
$ORANGE \033[38;2;255;128;0m
$BLUE \033[0;34m
$PURPLE \033[0;34m
$PINK \033[38;2;255;0;127m
$CYAN \033[0;36m
$WHITE \033[0;37m
$BLACK \033[0;30m
$BROWN \033[38;2;244;164;96m
$GRAY \033[1;30m
$LIGHT_GRAY \033[38;2;192;192;192m


You can test the color codes yourself by running the following command in a terminal:

$ echo "<ANSI escape code> Test123"

This will output on your console a 'Test123' text in the color of the chosen ANSI escape code.