- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Color
v50.14 · v0.47.05 This article is about the current version of DF.Note that some content may still need to be updated. |
- (For an overview of graphics in DF, see Graphics)
- (For user compiled colors see color scheme)
DF can use 16 colors to give every tile a foreground and background color. These 16 colors make up the color scheme. Which of these colors are assigned to a given tile is often decided by values in its raw file. Whether a pixel shows foreground, background, black or anything in between is influenced by its brightness and opacity. Color is used to express various information, from a dwarf's profession to the natural color of a terrain feature to the material an item is made of.
Overview
In the simplest case, A pixel on a tileset is either white (foreground) or transparent* (background). However, black, and anything in between is possible as well (even color):
- a white pixel will show the foreground color
- a transparent* pixel will show the background color
- a black pixel will stay black
The darker a white pixel is (i.e. a shade of grey), the darker the foreground color will be displayed. Similarly, a more opaque (i.e. 'not transparent') and black transparent pixel will result in a darker background color. A partially transparent, non-black pixel shows both the background and foreground color.[Verify]
To decide which colors to use, DF looks at raw values for that object (color value or color token) and selects a foreground and background color from the 16 colors in the color scheme. When a color value is defined, it directly picks it from the 16. When instead a color token is defined, the game compares the color token definition to all 16 colors in the color scheme and picks the closest match.
*magenta for .bmp files.
How Colors are assigned
Colors of Status icons, professions, text and the interface in general are hardcoded. Items, furniture, constructions, and geographic features get the color of their material. Dyes and material contaminants use color tokens.
Wall and floor color
While the foreground, background and brightness shown in the RAW files will be applied to walls, the mineral's "secondary" color will end up different. Here is how it works:
- If the BASIC_COLOR tag is specified, it will use that color. Note that the BASIC_COLOR tag only has foreground and brightness as arguments.
- If BASIC_COLOR is left out:
- The background color is forced to 0 (effectively stripping it).
- If the foreground color is 0, the game will display it as dark grey, color 8 (in other words, color 0 with brightness 1).
This is effective for stairs, floors, ramps, and constructions (in the case of stone). When stone is engraved, it uses the material's TILE_COLOR (which is the same as the DISPLAY_COLOR unless overridden).
Color values
Colors are primarily defined using the [COLOR:x:y:z] or [DISPLAY_COLOR:x:y:z] tokens. The three arguments are:
- Foreground color [0-7]
- Background color [0-7]
- Brightness of the foreground color [0 or 1]
The brightness of the background color is always 0.
By default*, the following 8 pairs of colors are displayed:
|
|
- (* See color scheme for information about how to change the actual various colors as displayed.)
Sometimes the color numbers are part of another token, e.g. [LEAVES:quarry bush leaf:quarry bush leaves:6:7:0:0:0:0:1:LOCAL_PLANT_MAT:LEAF]
specifies the colors "7:0:0" for quarry bush leaves and "0:0:1" for wilted quarry bush leaves.
Values 8-15
If the brightness value is 1 or another nonzero number, it adds 8 to the foreground color. If the final value of the foreground or background is 8-15, it appears as a "bright" color.
As these values can be manually typed in instead of using the brightness value, you can also give the background a bright color with this method. For example, for a white background color, add 8 to 7 = 15. For a light green background color, you add 8 to 2 = 10.
Color tokens
Material contaminants and dyes do not use color flags; instead, they reference color tokens defined in descriptor_color_standard.txt. Color tokens are simply referenced by the token name, e.g. [STATE_COLOR:SOLID:DARK_GREEN]
or [POWDER_DYE:EMERALD]
. However, the defined RGB values are never actually displayed in-game - instead, the game uses one of the above 16 colors, choosing the one with the closest RGB values.
The following colors are defined via tokens:
|
|
|
Raws |
---|
[COLOR:AMBER]
[NAME:amber]
[WORD:AMBER]
[RGB:255:191:0]
[COLOR:AMETHYST]
[NAME:amethyst]
[WORD:AMETHYST]
[RGB:153:102:204]
[COLOR:AQUA]
[NAME:aqua]
[WORD:AQUA]
[RGB:0:255:255]
[COLOR:AQUAMARINE]
[NAME:aquamarine]
[WORD:AQUAMARINE]
[RGB:127:255:212]
[COLOR:ASH_GRAY]
[NAME:ash gray]
[WORD:GRAY]
[RGB:178:190:181]
[COLOR:AUBURN]
[NAME:auburn]
[WORD:AUBURN]
[RGB:111:53:26]
[COLOR:AZURE]
[NAME:azure]
[WORD:AZURE]
[RGB:0:127:255]
[COLOR:BEIGE]
[NAME:beige]
[WORD:BEIGE]
[RGB:245:245:220]
[COLOR:BLACK]
[NAME:black]
[WORD:BLACK]
[RGB:0:0:0]
[COLOR:BLUE]
[NAME:blue]
[WORD:BLUE]
[RGB:0:0:255]
[COLOR:BRASS]
[NAME:brass]
[WORD:BRASS]
[RGB:181:166:66]
[COLOR:BRONZE]
[NAME:bronze]
[WORD:BRONZE]
[RGB:205:127:50]
[COLOR:BROWN]
[NAME:brown]
[WORD:BROWN]
[RGB:150:75:0]
[COLOR:BUFF]
[NAME:buff]
[WORD:BUFF]
[RGB:240:220:130]
[COLOR:BURNT_SIENNA]
[NAME:burnt sienna]
[WORD:SIENNA]
[RGB:233:116:81]
[COLOR:BURNT_UMBER]
[NAME:burnt umber]
[WORD:UMBER]
[RGB:138:51:36]
[COLOR:CARDINAL]
[NAME:cardinal]
[WORD:CARDINAL_COLOR]
[RGB:196:30:58]
[COLOR:CARMINE]
[NAME:carmine]
[WORD:CARMINE]
[RGB:150:0:24]
[COLOR:CERULEAN]
[NAME:cerulean]
[WORD:CERULEAN]
[RGB:0:123:167]
[COLOR:CHARCOAL]
[NAME:charcoal]
[WORD:CHARCOAL]
[RGB:54:69:79]
[COLOR:CHARTREUSE]
[NAME:chartreuse]
[WORD:CHARTREUSE]
[RGB:127:255:0]
[COLOR:CHESTNUT]
[NAME:chestnut]
[WORD:CHESTNUT]
[RGB:205:92:92]
[COLOR:CHOCOLATE]
[NAME:chocolate]
[WORD:CHOCOLATE]
[RGB:210:105:30]
[COLOR:CINNAMON]
[NAME:cinnamon]
[WORD:CINNAMON]
[RGB:123:63:0]
[COLOR:CLEAR]
[NAME:clear]
[WORD:CLEAR]
[RGB:128:128:128]
[COLOR:COBALT]
[NAME:cobalt]
[WORD:COBALT]
[RGB:0:71:171]
[COLOR:COPPER]
[NAME:copper]
[WORD:COPPER]
[RGB:184:115:51]
[COLOR:CREAM]
[NAME:cream]
[WORD:CREAM]
[RGB:255:253:208]
[COLOR:CRIMSON]
[NAME:crimson]
[WORD:CRIMSON]
[RGB:220:20:60]
[COLOR:DARK_BLUE]
[NAME:dark blue]
[WORD:BLUE]
[RGB:0:0:139]
[COLOR:DARK_BROWN]
[NAME:dark brown]
[WORD:BROWN]
[RGB:101:67:33]
[COLOR:DARK_CHESTNUT]
[NAME:dark chestnut]
[WORD:CHESTNUT]
[RGB:152:105:96]
[COLOR:DARK_GREEN]
[NAME:dark green]
[WORD:GREEN]
[RGB:1:50:32]
[COLOR:DARK_INDIGO]
[NAME:dark indigo]
[WORD:INDIGO]
[RGB:49:0:98]
[COLOR:DARK_OLIVE]
[NAME:dark olive]
[WORD:OLIVE]
[RGB:85:104:50]
[COLOR:DARK_PEACH]
[NAME:dark peach]
[WORD:PEACH]
[RGB:255:218:185]
[COLOR:DARK_PINK]
[NAME:dark pink]
[WORD:PINK]
[RGB:231:84:128]
[COLOR:DARK_SCARLET]
[NAME:dark scarlet]
[WORD:SCARLET]
[RGB:86:3:25]
[COLOR:DARK_TAN]
[NAME:dark tan]
[WORD:TAN]
[RGB:145:129:81]
[COLOR:DARK_VIOLET]
[NAME:dark violet]
[WORD:VIOLET]
[RGB:66:49:137]
[COLOR:ECRU]
[NAME:ecru]
[WORD:ECRU]
[RGB:194:178:128]
[COLOR:EMERALD]
[NAME:emerald]
[WORD:EMERALD]
[RGB:80:200:120]
[COLOR:FERN_GREEN]
[NAME:fern green]
[WORD:GREEN]
[RGB:79:121:66]
[COLOR:FLAX]
[NAME:flax]
[WORD:FLAX]
[RGB:238:220:130]
[COLOR:FUCHSIA]
[NAME:fuchsia]
[WORD:FUCHSIA]
[RGB:244:0:161]
[COLOR:GOLD]
[NAME:gold]
[WORD:GOLD]
[RGB:212:175:55]
[COLOR:GOLDEN_YELLOW]
[NAME:golden yellow]
[WORD:GOLD]
[WORD:YELLOW]
[RGB:255:223:0]
[COLOR:GOLDENROD]
[NAME:goldenrod]
[WORD:GOLDENROD]
[RGB:218:165:32]
[COLOR:GRAY]
[NAME:gray]
[WORD:GRAY]
[RGB:128:128:128]
[COLOR:GREEN]
[NAME:green]
[WORD:GREEN]
[RGB:0:255:0]
[COLOR:GREEN-YELLOW]
[NAME:green-yellow]
[WORD:GREEN]
[WORD:YELLOW]
[RGB:173:255:47]
[COLOR:HELIOTROPE]
[NAME:heliotrope]
[WORD:HELIOTROPE]
[RGB:223:115:255]
[COLOR:INDIGO]
[NAME:indigo]
[WORD:INDIGO]
[RGB:75:0:130]
[COLOR:IVORY]
[NAME:ivory]
[WORD:IVORY]
[RGB:255:255:240]
[COLOR:JADE]
[NAME:jade]
[WORD:JADE]
[RGB:0:168:107]
[COLOR:LAVENDER]
[NAME:lavender]
[WORD:LAVENDER]
[RGB:230:230:250]
[COLOR:LAVENDER_BLUSH]
[NAME:lavender blush]
[WORD:LAVENDER]
[RGB:255:240:245]
[COLOR:LEMON]
[NAME:lemon]
[WORD:LEMON]
[RGB:253:233:16]
[COLOR:LIGHT_BLUE]
[NAME:light blue]
[WORD:BLUE]
[RGB:173:216:230]
[COLOR:LIGHT_BROWN]
[NAME:light brown]
[WORD:BROWN]
[RGB:205:133:63]
[COLOR:LILAC]
[NAME:lilac]
[WORD:LILAC]
[RGB:200:162:200]
[COLOR:LIME]
[NAME:lime]
[WORD:LIME]
[RGB:204:255:0]
[COLOR:MAHOGANY]
[NAME:mahogany]
[WORD:MAHOGANY]
[RGB:192:64:0]
[COLOR:MAROON]
[NAME:maroon]
[WORD:MAROON_COLOR]
[RGB:128:0:0]
[COLOR:MAUVE]
[NAME:mauve]
[WORD:MAUVE]
[RGB:153:51:102]
[COLOR:MAUVE_TAUPE]
[NAME:mauve taupe]
[WORD:MAUVE]
[WORD:TAUPE]
[RGB:145:95:109]
[COLOR:MIDNIGHT_BLUE]
[NAME:midnight blue]
[WORD:BLUE]
[RGB:0:51:102]
[COLOR:MINT_GREEN]
[NAME:mint green]
[WORD:GREEN]
[RGB:152:255:152]
[COLOR:MOSS_GREEN]
[NAME:moss green]
[WORD:GREEN]
[RGB:173:223:173]
[COLOR:OCHRE]
[NAME:ochre]
[WORD:OCHRE]
[RGB:204:119:34]
[COLOR:OLIVE]
[NAME:olive]
[WORD:OLIVE]
[RGB:128:128:0]
[COLOR:ORANGE]
[NAME:orange]
[WORD:ORANGE]
[RGB:255:165:0]
[COLOR:PALE_BLUE]
[NAME:pale blue]
[WORD:BLUE]
[RGB:175:238:238]
[COLOR:PALE_BROWN]
[NAME:pale brown]
[WORD:BROWN]
[RGB:152:118:84]
[COLOR:PALE_CHESTNUT]
[NAME:pale chestnut]
[WORD:CHESTNUT]
[RGB:221:173:175]
[COLOR:PALE_PINK]
[NAME:pale pink]
[WORD:PINK]
[RGB:250:218:221]
[COLOR:PEACH]
[NAME:peach]
[WORD:PEACH]
[RGB:255:229:180]
[COLOR:PEARL]
[NAME:pearl]
[WORD:PEARL]
[RGB:240:234:214]
[COLOR:PERIWINKLE]
[NAME:periwinkle]
[WORD:PERIWINKLE]
[RGB:204:204:255]
[COLOR:PINE_GREEN]
[NAME:pine green]
[WORD:GREEN]
[WORD:PINE]
[RGB:1:121:111]
[COLOR:PINK]
[NAME:pink]
[WORD:PINK]
[RGB:255:192:203]
[COLOR:PLUM]
[NAME:plum]
[WORD:PLUM]
[RGB:102:0:102]
[COLOR:PUCE]
[NAME:puce]
[WORD:PUCE]
[RGB:204:136:153]
[COLOR:PUMPKIN]
[NAME:pumpkin]
[WORD:PUMPKIN]
[RGB:255:117:24]
[COLOR:PURPLE]
[NAME:purple]
[WORD:PURPLE]
[RGB:102:0:153]
[COLOR:RAW_UMBER]
[NAME:raw umber]
[WORD:UMBER]
[RGB:115:74:18]
[COLOR:RED]
[NAME:red]
[WORD:RED]
[RGB:255:0:0]
[COLOR:RUSSET]
[NAME:russet]
[WORD:RUSSET]
[RGB:117:90:87]
[COLOR:RUST]
[NAME:rust]
[WORD:RUST]
[RGB:183:65:14]
[COLOR:SAFFRON]
[NAME:saffron]
[WORD:SAFFRON]
[RGB:244:196:48]
[COLOR:SCARLET]
[NAME:scarlet]
[WORD:SCARLET]
[RGB:255:36:0]
[COLOR:SEA_GREEN]
[NAME:sea green]
[WORD:GREEN]
[WORD:SEA]
[WORD:OCEAN]
[RGB:46:139:87]
[COLOR:SEPIA]
[NAME:sepia]
[WORD:SEPIA]
[RGB:112:66:20]
[COLOR:SILVER]
[NAME:silver]
[WORD:SILVER]
[RGB:192:192:192]
[COLOR:SKY_BLUE]
[NAME:sky blue]
[WORD:BLUE]
[RGB:135:206:235]
[COLOR:SLATE_GRAY]
[NAME:slate gray]
[WORD:GRAY]
[RGB:112:128:144]
[COLOR:SPRING_GREEN]
[NAME:spring green]
[WORD:GREEN]
[RGB:0:255:127]
[COLOR:TAN]
[NAME:tan]
[WORD:TAN]
[RGB:210:180:140]
[COLOR:TAUPE_DARK]
[NAME:dark taupe]
[WORD:TAUPE]
[RGB:72:60:50]
[COLOR:TAUPE_GRAY]
[NAME:taupe gray]
[WORD:TAUPE]
[WORD:GRAY]
[RGB:139:133:137]
[COLOR:TAUPE_MEDIUM]
[NAME:taupe]
[WORD:TAUPE]
[RGB:103:76:71]
[COLOR:TAUPE_PURPLE]
[NAME:purple taupe]
[WORD:PURPLE]
[WORD:TAUPE]
[RGB:80:64:77]
[COLOR:TAUPE_PALE]
[NAME:pale taupe]
[WORD:TAUPE]
[RGB:188:152:126]
[COLOR:TAUPE_ROSE]
[NAME:rose taupe]
[WORD:TAUPE]
[RGB:144:93:93]
[COLOR:TAUPE_SANDY]
[NAME:sandy taupe]
[WORD:TAUPE]
[RGB:150:113:23]
[COLOR:TEAL]
[NAME:teal]
[WORD:TEAL]
[RGB:0:128:128]
[COLOR:TURQUOISE]
[NAME:turquoise]
[WORD:TURQUOISE]
[RGB:48:213:200]
[COLOR:VERMILION]
[NAME:vermilion]
[WORD:VERMILION]
[RGB:227:66:52]
[COLOR:VIOLET]
[NAME:violet]
[WORD:VIOLET]
[RGB:139:0:255]
[COLOR:WHITE]
[NAME:white]
[WORD:WHITE]
[RGB:255:255:255]
[COLOR:YELLOW]
[NAME:yellow]
[WORD:YELLOW]
[RGB:255:255:0]
[COLOR:YELLOW_GREEN]
[NAME:yellow-green]
[WORD:GREEN]
[WORD:YELLOW]
[RGB:154:205:50]
|
Note: These numbers may need to be expressed in "hexadecimal" (base 16) notation – a couple good converters can be found here and here. For further information, see this article.
Color Lists
- For the different colors used to represent different professions, see Skill categories.
- For a list of the colors of items listed in the z-stocks menu, see Stocks.
- For the colors of the various creatures, see creature
- For the colors of status icons, see status icon
Material By Color
Material properties |
Defined: Value • Color • Density • Strain at yield • Temperature values |
Derived: Magma safety • Fire safety |
Fluids: Depth • Flow • Pressure |
For those concerned with aesthetics and want to know which materials are available in each color.
"Color" in other Languages
|