@dragonspark/chroma-kit
    Preparing search index...

    Function rgbToXYZ

    • Converts an RGB color to the CIE XYZ color space.

      This function first linearizes the RGB color values (removes gamma correction), then applies the RGB to XYZ transformation matrix. Optionally, it can perform chromatic adaptation to convert from the D65 white point (standard for RGB) to the D50 white point (commonly used in other color spaces).

      Parameters

      • color: RGBColor

        The RGB color to convert

      • OptionaluseChromaticAdaptation: boolean = false

        Whether to adapt from D65 to D50 white point

      Returns XYZColor

      The color in XYZ space, with the appropriate illuminant specified