-
Notifications
You must be signed in to change notification settings - Fork 27
Named Colors
Avionics Systems Named Colors system is 100% compatible with RasterPropMonitor, meaning that a MAS IVA can use the same color names as an RPM IVA.
Custom colors are declared in config nodes, which may be placed in any .cfg file. A custom color node looks like this:
RPM_GLOBALCOLORSETUP
{
COLORDEFINITION
{
name = MOARdV_IndicatorLampOff
color = 0, 0, 0, 255
}
COLORDEFINITION
{
name = MOARdV_IndicatorLampGreen
color = 0, 255, 58, 255
}
...
}
Each color must contain a name
and color
field, and each name should be unique. In the case of duplicate names, only the last name's color is stored. The color
field defines the red, green, blue, and alpha channel values, each of which range from 0 to 255.
To use a named color, it must be prefixed with COLOR_
(for example, COLOR_MOARdV_IndicatorLampOff
).
These global colors that are defined in config files may be overridden in each command pod by adding an RPM_COLOROVERRIDE
node, as explained in the MASFlightComputer documentation.
Why would you use named colors? There are two benefits to named colors. First, using a name means that there is only one place where you need to change that color. Instead of editing dozens or hundreds of files, you can edit one entry in one table. Second, for people making customized IVAs, MAS allows each IVA to override named colors. If you're using an existing prop pack, but you want to make changes to some of the colors, you don't have to make copies of all of the props just to change a color. Instead, you use an override in the IVA's config file to change those named colors.
In addition, MAS includes the colors from the XKCD Color Table. These are generated automatically from the KSP game data. They can be accessed using the name COLOR_XKCD_(colorname)
, such as COLOR_XKCD_SUNYELLOW
. Note that spaces ' ' in a name are removed, like in this example.
Squad included some of their own colors in this table, and they can be accessed the same way (colors are approximate, and may be off by 1):
- COLOR_XKCD_KSPBADASSGREEN: (#b8c971)
- COLOR_XKCD_KSPNOTSOGOODORANGE: (#ffb000)
- COLOR_XKCD_KSPUIGREY: (#36393d)
- COLOR_XKCD_KSPUNNAMEDCYAN: (#5fbdb9)
- COLOR_XKCD_KSPNEUTRALUIGREY: (#cac6b7)