interface RGBOptions {
    aliases?: string[];
    base?: string | Space;
    coords?: Record<string, CoordMeta>;
    cssId?: string;
    formats?: Record<string, SpaceFormat>;
    fromBase?: ((coords) => number[]);
    fromXYZ_M?: Matrix3x3;
    gamutSpace?: string | Space;
    id: string;
    name: string;
    referred?: string;
    toBase?: ((coords) => number[]);
    toXYZ_M?: Matrix3x3;
    white?: string | White;
}

Hierarchy (view full)

Properties

aliases?: string[]
base?: string | Space

The base color space

coords?: Record<string, CoordMeta>

Object mapping coord ids to coord metadata

cssId?: string

The ID used by CSS, such as display-p3 or --cam16-jmh

formats?: Record<string, SpaceFormat>

Details about string formats to parse from / serialize to

See

Format

fromBase?: ((coords) => number[])

Function that converts coords in the base color space to coords in this color space. Must perform chromatic adaptation if needed

Type declaration

    • (coords): number[]
    • Parameters

      Returns number[]

fromXYZ_M?: Matrix3x3
gamutSpace?: string | Space
id: string

Id of this space, used in things such as conversions

name: string

The readable name of the space, used in user-facing UI

referred?: string
toBase?: ((coords) => number[])

Function that converts coords in this color space to coords in the base color space. Must perform chromatic adaptation if needed

Type declaration

    • (coords): number[]
    • Parameters

      Returns number[]

toXYZ_M?: Matrix3x3
white?: string | White