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

    Function oklchToRGB

    • Converts a color from OKLCh to RGB color space.

      This function first converts the OKLCh color to XYZ, then from XYZ to RGB. Gamut mapping is performed during the XYZ to RGB conversion to ensure the resulting color is within the valid RGB gamut. This prevents unexpected results when working with colors that have high chroma values or are otherwise outside the RGB gamut.

      Parameters

      • color: OKLChColor

        The OKLCh color to convert

      • OptionalperformGamutMapping: boolean = true

        Whether to perform gamut mapping

      Returns RGBColor

      The color in RGB space