Skip to content

rgb1ToRgb8

rgb1ToRgb8(value): Rgb8

Defined in: packages/math-color/src/conversions/rgb-rgb8.ts:17

Converts RGB values from the range [0, 1] to [0, 255].

Rounds to nearest rather than truncating, which would bias every channel down and make rgb8ToRgb1 → rgb1ToRgb8 lose a step on almost every colour.

RgbCoords

The RGB color in the range [0, 1].

Rgb8

The corresponding RGB color in the range [0, 255].