Convert standard RGB color definitions into OKLCH, the cylindrical form of OKLab and a color function supported directly in current browsers.
Input formats
Provide colors using the standard rgb(r, g, b) syntax with channel values ranging from 0 to 255. Each line is parsed independently in batch mode.
OKLCH output
rgb(255, 87, 51) becomes oklch(68.04% 0.21 33.69). Lightness prints as a percentage, chroma as a plain number, and hue as a degree value from 0 to 360.
Building tints and shades
Raising or lowering only the L value in OKLCH while holding chroma and hue fixed produces a lighter or darker version of a color that keeps its hue and intensity more consistent than adjusting RGB channels directly, which is a common reason to convert an existing brand palette into this space.