Primitive type: color

Primitive type: color


In files and scritps a color can be represented as

rgb(red_component, green_component, blue_component)

where red_component, green_component and blue_component are numbers between 0 and 255 (inclusive).

In some places MSE also supports colors with a transparency value, notated as

rgba(red_component, green_component, blue_component, alpha_component)

An alpha value of 0 indicates a transparent color, an alpha value of 255 is completely opaque.

Named colors

MSE also supports named colors, for instance "white" is the same as rgb(255,255,255). For a full list of supported colors, see the wxWidgets documentation. In addition, the named color "transparent" stands for the completely transparent color, rgba(0,0,0,0).

In scripts named colors are represented as strings.


For example:

Code Represents
rgb(255,255,255) white
rgb(0,0,0) black
rgb(255,0,0) red
rgb(0,255,0) green
rgb(0,0,255) blue
rgba(0,0,0,0) transparent
rgba(255,0,0,128) transparent red
rgba(0,0,255,192) transparent blue

See also

to_color Convert any value to a color