Skip to content

textmode.js / color / TextmodeColor

Class: TextmodeColor

Color value used by textmode drawing APIs.

Values are stored as 0-255 integers for compatibility with public APIs. Normalized versions are also available for shader uploads.

Use Textmodifier.color to create colors.

Example

Properties

PropertyDescription
aAlpha component (0-255).
bBlue component (0-255).
gGreen component (0-255).
rRed component (0-255).

Accessors

AccessorDescription
normalizedNormalized (0-1) RGBA tuple.
rgbPlain RGB tuple with integer components.
rgbaPlain RGBA tuple with integer components.

Methods

MethodDescription
withAlphaCreate a copy of this color with a different alpha value.