Color

Represents an RGB color value.

Color interface

Represents an RGB color value.

Signature:

interface Color

Remarks

Color values are in the range [0, 255] for each channel.

Example

const red: Color = { r: 255, g: 0, b: 0 };
const white: Color = { r: 255, g: 255, b: 255 };
const black: Color = { r: 0, g: 0, b: 0 };

Properties

Property

Modifiers

Type

Description

b

number

Blue channel value (0 to 255)

g

number

Green channel value (0 to 255)

r

number

Red channel value (0 to 255)

Last updated: August 5, 2026 at 11:47 AMEdit this page