@OPEN-KAPPA/COLORS
    Preparing search index...

    Type Alias ColorMetaConfig<C>

    The configuration of a ColorMeta class.

    type ColorMetaConfig<C extends Color> = {
        chromaIndex: number | null;
        classDef: ColorConstructor<C>;
        componentNames: string[];
        componentUnits: ColorUnit[];
        constraint?: (comps: number[]) => number[];
        cssMeta: CssMetaInfo | null;
        hdrLimits: ColorLimit[];
        hueIndex: number | null;
        lightnessIndex: number | null;
        luminance: ColorLimit;
        name: ColorSpaceName;
        sdrLimits: ColorLimit[];
        xyyBoundaries: Point2D[] | null;
    }

    Type Parameters

    Index

    Properties

    chromaIndex: number | null

    The index of the chroma component. Null if there is no chroma component.

    classDef: ColorConstructor<C>

    Pointer to the Color subclass.

    componentNames: string[]

    The component names, in order, and with alpha as last.

    componentUnits: ColorUnit[]

    Component units, in order, with 1 for the alpha.

    constraint?: (comps: number[]) => number[]

    Optional pre-clipping constraint solver. While sdrLimits and hdrLimits handle absolute min/max values per component, some color spaces have inter-component dependencies. For example, in HWB, the sum of Whiteness and Blackness cannot exceed 100%. This callback is executed right before the standard clipping process to resolve these mathematical dependencies (e.g., proportionally scaling components down) before the hard min/max limits are applied.

    Type Declaration

      • (comps: number[]): number[]
      • Parameters

        • comps: number[]

          The raw components array.

        Returns number[]

        A new array with the constrained components.

    cssMeta: CssMetaInfo | null

    CSS support meta infos. Null if no CSS representation is supported.

    hdrLimits: ColorLimit[]

    Limit of HDR ranges for each component, in order and with alpha last.

    hueIndex: number | null

    The index of the hue component of polar color spaces. Null if it is not polar.

    lightnessIndex: number | null

    The index of the lightness component. Null if there is no lightness component.

    luminance: ColorLimit

    Standardized liminance limits.

    The color space name.

    sdrLimits: ColorLimit[]

    Limit of SDR ranges for each component, in order and with alpha last.

    xyyBoundaries: Point2D[] | null

    List of 2D gamut boundaries in xyY color space.