Convert standard RGB color definitions into CIELAB, a color space modeled on human perception rather than screen light mixing.
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.
LAB output
rgb(255, 87, 51) becomes lab(61.03% 63.55 55.96). Lightness prints as a percentage; the a and b axes print as plain signed numbers.
Perceptual distance
Two RGB colors with the same numeric difference in their channels can look very different apart depending on where they sit in the color space. LAB’s a and b axes are built so a fixed numeric gap tracks a more consistent perceived gap, which is why it’s used for color-matching tolerances rather than raw RGB or HEX differences.