Class for color spaces. Each color space corresponds to a ColorSpace instance

Hierarchy (view full)

Constructors

Properties

aliases?: string[]
base: Space
coords: Record<string, CoordMeta>
formats: Record<string, SpaceFormat>
fromBase?: ((coords: Coords) => Coords)
gamutSpace: Space
id: string
name: string
referred?: string
toBase?: ((coords: Coords) => Coords)
white: White
DEFAULT_FORMAT: {
    name: "color";
    type: "functions";
}
registry: Record<string, Space>

Accessors

  • get cssId(): string
  • The ID used by CSS, such as display-p3 or --cam16-jmh

    Returns string

Methods

  • Parameters

    • coords: Coords
    • Optionaloptions: {
          epsilon?: number;
      }
      • Optionalepsilon?: number

    Returns boolean

  • Parameters

    • filters: string | object
    • Optionalspaces: Space[]

    Returns Format

  • Parameters

    • ref: Ref
    • OptionalworkingSpace: string | Space

    Returns CoordMeta & {
        id: string;
        index: number;
        space: Space;
    }

    If no space or an unknown space is provided