This section contains a list of colors used for various purposes in the game, most notably to differentiate various players (Houses) from each other.
Each color entry has a unique name identifier followed by three values representing the hue, saturation and value of the color expressed in bytes (0–255). The value component specifies the maximum brightness allowed for the color as the color spread is generated. Hue remains constant. Saturation curves through color space as the value component changes so that darker colors become more saturated.
The game forms an internal table of colors from the color entries in this section according to the order in which they are listed. When populating the color table, the game creates two instances of every color: one for remap, and another for UI and text elements. The former constitute odd-numbered indexes in the color table, while the latter take up even-numbered slots. This is supported by the following developer comment in rules(md).ini:
;gs note to coders, these entries are all doubled, so ColorSchemes is White, not 2.
More colors can be freely added to this section, as long as they have unique names.
Player colors available in multiplayer are hardcoded to certain indexes (not IDs) in the internal table. Below is a list of these indexes and their respective colors. The multiplayer color index determines the order in which the colors appear in the multiplayer dialog.
|Index (TS/FS)||Index (RA2/YR)||Multiplayer Index||ID|
Most buildings and units in the game have color areas in their art that are remapped according to the owner house's color. These areas consist of colors #16–31 in the UNITSNO, UNITEM and (in RA2) UNITURB palettes, represented by a gradient of red.
UI & text
Several color IDs and/or indexes in this section are hardcoded for various UI and text elements. Below is a few examples from TS:
|Index||0||UI top bar text, pip text|
|ID||LightGold||Closing credits text|
|ID||LightGrey||Neutral & Special 0House color, cameo "on hold" status and queue count|
|ID||Grey||Default text print & gadget color and MP debug text print|
|ID||Green||Map lighting, loading screen progress text, tooltips, Dropship loadout and ingame menu version text|
|ID||LightBlue||Sidebar icon "ready" status|
While the color values are freely editable, there are issues with the color displayed in the color selection menu in both Tiberian Sun and Red Alert 2. In TS, the color names in the color selection menu are hardcoded; editing the values associated with a color will not change the name of the color as it appears in the menu, although it will alter the color the text is displayed in. For example, editing DarkGreen into a brown color tone will result in the color selection menu containing a brown-colored text reading "Green", which can be selected in order to have the respective house play with a brown color in the acctual game.
Red Alert 2 has a distinct, but similar issue in the color selection menu. Instead of colored names, RA2 uses little colored squares representing each available color. However, the color of these squares is independent from the actual in-game color values. In other words, if the color values are changed, the colored square in the menu will not change its color to reflect the new values - it will instead keep displaying its default color, which may not correspond to the new color that the option it represents has been changed into.
Objects displaying through shroud
The Tiberian Sun Client and its derivatives allow modders to use any of the colors listed in this section as player colors by referring to the game's internal color table. However, care should be taken, as using even-numbered color indexes results in the player objects clipping through shroud (as demonstrated in this screenshot). This is because even-numbered colors are reserved for UI and text elements, so they must, by design, ignore any alpha layers like the shroud. See the Structure section for more information.