Skip to main content

Function: normalizeByteColor4()

normalizeByteColor4(color, useByteColors?): NumberArray4

Defined in: lib/color/normalize-byte-colors.ts:43

Normalizes an RGBA semantic color to float space when byte-style colors are enabled.

Parameters​

color​

readonly [number, number, number] | readonly [number, number, number, number]

Input RGB or RGBA semantic color.

useByteColors?​

boolean = true

When true, divide components by 255.

Returns​

NumberArray4

The normalized RGBA color, adding an opaque alpha channel when needed.