5.9. Color (property)

<color> ‐ A color

5.9.1. Attributes

NameTypeDefaults
idIDNone (required)
indexINTEGERNone
rFLOAT0.0
gFLOAT0.0
bFLOAT0.0
aFLOAT1.0

5.9.2. Description

This element defines a color for the current media object. The index attribute is required when the color is the child element of tabcolor. The float values of the r, g, and b attributes define the float values (expected between 0.0 and 1.0) for the red, green, and blue components.

The float value of the a attribute defines the float value (expected between 0.0 and 1.0) of the alpha component (transparency).

Colors and textures can be blended if the env_mode attribute of the texture is equal to blend_fragment.

5.9.3. Expected child

None.

5.9.4. Example

The example below defines an opaque green color.

<color id="green" r="0.0" g="1.0" b="0.0"/>