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

    Function xyzToOKLab

    • Converts a color from CIE XYZ to OKLab color space.

      This function implements the XYZ to OKLab conversion algorithm, which includes:

      1. Converting XYZ to LMS cone responses using a transformation matrix
      2. Applying a non-linear transformation (cube root) to the LMS values
      3. Converting the non-linear LMS values to OKLab using another matrix

      The OKLab color space is designed to be perceptually uniform with improved accuracy compared to the traditional Lab space.

      Parameters

      • color: XYZColor

        The XYZ color to convert

      Returns OKLabColor

      The color in OKLab space