Skip to main content

Function: resolveUseByteColors()

resolveUseByteColors(useByteColors?, defaultUseByteColors?): boolean

Defined in: api/color/normalize-byte-colors.ts:18

Resolves the numeric range of untyped JavaScript color arrays. Typed color arrays carry their own encoding and ignore this flag in the normalization helpers.

Parameters​

useByteColors?​

boolean

Explicit convention for JavaScript arrays.

defaultUseByteColors?​

boolean = true

Convention to use when the flag is omitted; defaults to bytes.

Returns​

boolean

Whether JavaScript array components should be divided by 255.