ColorOKLABa
Represents a color in the OKLAB color space with an optional alpha (transparency) value. OKLAB is a perceptual color space designed to represent colors in a way that aligns with human visual perception, offering an alternative to traditional color spaces like RGB.
Functions
Defines a range between two colors by creating a sequence of colors that transition smoothly from the start color to the end color.
Converts this color to ColorRGBa, gamut-mapping it first if it falls outside the RGB gamut. Unlike toRGBa -- which converts directly and can produce components outside [0, 1] for an out-of-gamut color -- this holds lightness (l) and hue (the a/b direction) fixed and reduces chroma to find_gamut_intersection's boundary, the "reduce saturation until it fits" gamut-mapping strategy. A final ColorRGBa.clip guards against the tiny floating-point overshoot the boundary search can leave right at the edge of the gamut.