What color tokens determine the color of material tiles such as walls, doors, and barrels?
When modding Dwarf Fortress raw files, the format of a color token is fairly simple:
[COLOR:8:7:0]
...where 8 is the foreground color, 7 is the background color, and 0 is the brightness flag. If set to 1, the brightness flag adds eight to the foreground color, if it's not already a bright color (8 through 15). The background color must be a dark color (0 through 7). The color for each number is given in the wiki.
However, there are different types of color tokens: COLOR
, DISPLAY_COLOR
, BUILD_COLOR
, BASIC_COLOR
, and TILE_COLOR
. Per the wiki, the COLOR
token should apply for all, but that doesn't seem to be the case in all circumstances.
I set bronze to [DISPLAY_COLOR:4:2:0]
, meaning brown foreground and dark green background, expecting that objects such as doors would be mostly bronze-colored with some green, hopefully looking something like a patina. However, when I constructed a door it came out all green. Do metal doors use the background color rather than the foreground color? Testing with another metal I get the same behavior: a door uses the metal's background color. Adding a [BUILD_COLOR:4:2:0]
token makes bronze doors brown, but without any green. Doors are described as multi-color in the wiki, but not if made of metal it seems.
I see that wooden barrels and stone doors use the foreground and background colors I specify with DISPLAY_COLOR
, as expected, while coffins use the foreground color only. Cages appear to blend the foreground and background colors, as I get slightly different shades of yellow for birch, maple, and pine, which I set to [DISPLAY_COLOR:14:7:0]
, 14:4:0, and 14:6:0, respectively. Metal bars use the foreground color exclusively. So there's definitely different behavior for different materials and types of buildings.