TXT · Text & Data tools

RGB to OKLab Converter

Active color#000000

rgb(0, 0, 0)

RGB Input
OKLab Output
1Active Line0Valid Items
Go To Full Color Converter

Convert standard RGB color definitions into OKLab, a perceptually uniform color space built to keep hue steady as lightness and chroma change.

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.

OKLab output

rgb(255, 87, 51) becomes oklab(68.04% 0.1747 0.1165). Lightness prints as a percentage; the a and b axes print as small signed numbers, usually within about -0.4 to 0.4.

Smoother color blends

Averaging RGB channels directly can produce a grayish or overly saturated midpoint between two colors. Averaging the same two colors in OKLab space keeps the perceived brightness and hue more consistent along the transition, which is the reasoning behind CSS Color 4 defaulting some interpolation modes to OKLab.

Frequently Asked Questions

CSS rgb() strings like rgb(255, 87, 51), with channels from 0 to 255. Paste one color per line for batch conversion.

L is lightness from 0% to 100%. a runs from green (negative) to red (positive), and b runs from blue (negative) to yellow (positive), each typically within roughly -0.4 to 0.4.

Blending two RGB colors by averaging their channels can pass through duller or muddier intermediate colors than either endpoint. Averaging in OKLab tends to produce a smoother, more even-looking transition, which is why CSS supports interpolating gradients and color-mix() in this space.

Try one of our format-specific converters below

Full Color Converter tool

Explore Our Tools

Browse all tools