Default value

null (white)

Possible values

  • null (white)
  • any color generated by rgb() (e.g., "#00ff00" for green)
  • a color matrix (in list form)

Controls the color of the icon displayed on players’ screens. This color is multiplied by the icon, so that a white icon will become this color. The color multiplier is also applied to maptext.

If you include an alpha component in the color, the atom’s alpha var will be set at the same time.

Overlays and images will also be multiplied by this color, unless they use the RESET_COLOR value in appearance_flags.

The color value can be set to a color matrix, which is a list of values. This allows for more complex transformations such as adding or subtracting color, inverting the color, turning to grayscale, shifting hue, etc. Using an RGB-only color matrix will include the existing alpha value in the matrix.

When reading the color var, if it is a matrix it will be read out as a list with 20 items (full RGBA format). That list is a copy, so if you save it and make changes to that list later it will not impact the actual color of the atom. This also means you can’t use color[9] = 0.5; you would have to grab the value of color first, make sure it’s a list, change it, and then assign the changed list back to the color var.

See also