Difference between revisions of "Modding:Color (0.9.9.7)"
From DoomRL Wiki
Yaflhdztioxo (Talk | contribs) (Created page with "In console mode all game tiles are associated with a particular color. Choosing a good color scheme is an important part of modding, but the choice is limited--only 16 colors exi...") |
Yaflhdztioxo (Talk | contribs) m (moved Modding:Color to Modding:Color (0.9.9.7)) |
Revision as of 22:04, 21 April 2013
In console mode all game tiles are associated with a particular color. Choosing a good color scheme is an important part of modding, but the choice is limited--only 16 colors exist in the standard VGA compatible console which, when combined into foreground and background, results in only 256 possible combinations. There are some special engine colors as well to further complicate matters.
Contents |
Color Definitions
Colors | |||
Color | ID | Valkyrie ID | Looks Like |
---|---|---|---|
BLACK | 0 | @D | |
BLUE | 1 | @b | |
GREEN | 2 | @g | |
CYAN | 3 | @c | |
RED | 4 | @r | |
MAGENTA | 5 | @v | |
BROWN | 6 | @n or @N | |
LIGHTGRAY | 7 | @l | |
DARKGRAY | 8 | @d | |
LIGHTBLUE | 9 | @B | |
LIGHTGREEN | 10 | @G | |
LIGHTCYAN | 11 | @C | |
LIGHTRED | 12 | @R | |
LIGHTMAGENTA | 13 | @V | |
YELLOW | 14 | @y or @Y | |
WHITE | 15 | @L |
Special Colors
Colors | ||||||||
Color | ID | Looks Like | Comments | |||||
---|---|---|---|---|---|---|---|---|
MULTIBLUE | 17 | Missile only | ||||||
MULTIYELLOW | 18 | Missile only | ||||||
MULTIPORTAL | 20 | Map object only | ||||||
COLOR_WATER | 21 | Map object only | ||||||
COLOR_ACID | 22 | Map object only | ||||||
COLOR_LAVA | 23 | Map object only |
Background Colors
DoomRL uses 4 bit color. In 4 bit color consoles the lower four bits correspond to the foreground color while the upper four bits correspond to the background color (usually). When you assign a color using the color constants above the upper bits will equal zero, which is the default background color--black. You can change this by explicitly assigning the upper 4 bits a value using code similar to the following:
color = LIGHTGRAY + (RED * 16)
The above statement will display light gray text over a red background. Officially this is unsupported. Unofficially it is used often enough that support for it will most likely continue. There is a caveat though--some combinations are used by the special colors above and thus cannot be used for regular items.
Notes and Advice
- The color.lua script can be used by players to customize tiles.
- Many objects have a color_id property that can be used to prevent unscrupulous players from distinguishing between items such as levers by color.
- Colors are not always consistent. Brown in particular can vary a lot and more closely mimics orange in some environments.
- Dark Blue is hard to see on a black background and should be used sparingly, especially with beings who can be frustrating when hard to see.
- Background colors should be used sparingly, if at all. The clear divides break immersion.
- Be aware of common roguelike coloring customs, especially those used by NetHack and (obviously) DoomRL.