Upgrading RGBA to OKLab
Use the converter above to translate a legacy RGBA color into the modern OKLab color space. The tool removes the sRGB gamma curve, processes the linear light through LMS cone response matrices, and outputs the perceptual L, a, and b coordinates.
The alpha transparency channel is not affected by the color space transformation. It simply carries over to the new OKLab value using the modern CSS slash syntax (e.g., oklab(L a b / alpha)).
Converting transparent colors to OKLab is particularly useful when creating CSS gradients that fade to transparent. Legacy RGB gradients often suffer from muddy color shifts as the opacity drops, whereas OKLab ensures the hue remains perfectly stable as it fades out.