oklch() syntax and units — is L 0–1 or 0–100%?
In CSS an OKLCH colour is written oklch(L C H). Three values separated by spaces, and alpha after a slash: oklch(L C H / 0.6). No commas. That is different from the familiar rgb(12, 34, 56), and the first attempts usually get it wrong.
L: 0–1 and 0–100%
The specification defines L as a number from 0 to 1. Written as a percentage, 0 to 100% maps onto that range, so oklch(0.58 0.16 250) and oklch(58% 0.16 250) are the same colour. Percentages read better and match design tools, so they are the practical choice. Mixing the two forms in one codebase produces a hundredfold error, so pick one.
| Form | Meaning | Note |
|---|---|---|
| oklch(0.58 0.16 250) | L 0.58, C 0.16, H 250° | L as a decimal |
| oklch(58% 0.16 250) | the same colour | percentage form, easier to read |
| oklch(58% 0.16 250 / 60%) | alpha 60% | alpha after the slash, 0–1 or percent |
| oklch(58% 0 0) | neutral grey | hue is irrelevant when C is 0 |
| oklch(58% 0.16 none) | no hue | none is not zero, it is undefined |
| color(oklch 58% 0.16 250) | color() form | same colour, alternative syntax |
Chroma and hue units
Chroma is a unitless number from 0 to 0.4. 0.4 is close to the theoretical maximum; what sRGB can actually hold is 0.1 to 0.3 depending on hue. Chroma also accepts a percentage where 100% equals 0.4, but browsers and tools display it differently enough that decimals are safer. Hue is an angle, so 250deg or a bare number both work, and 0° equals 360°.
It helps to know the hue circle. 0° pink and red, 30° orange, 60° yellow, 90° yellow-green, 120° green, 150° teal, 180° cyan, 210° sky, 240° blue, 270° indigo, 300° violet, 330° magenta. There are no exact names: the same angle is called different things at different chroma and lightness.
Alpha and none
Alpha goes after a slash, as in oklch(58% 0.16 250 / 0.5), from 0 to 1 or as a percentage, defaulting to 1. none means “no value” and makes interpolation skip that axis. Interpolating from a neutral grey with none avoids dragging an arbitrary hue through the middle; writing 0 would mean 0° and produce a different result.
What this tool writes
The calculator outputs the percentage form, oklch(58% 0.16 250): L to two decimals, chroma to four with trailing zeros trimmed, hue rounded to a whole number. That matches the recommendation in CSS Color 4 and makes re-entering a value reproduce the same result. At that precision no screen shows a difference.
Syntax follows W3C CSS Color Module Level 4 and MDN's oklch() reference.
Questions
What happens if L is written as 58 without a unit?
A bare number is read on the 0–1 scale, so 58 is out of range and clamps to 1, giving a near-white. Always use % or a decimal for L.
Can hue be negative?
Yes. -110deg normalises to 250deg. Keeping values inside 0–360 is easier to read.
Does chroma as a percentage change the value?
Chroma 100% equals 0.4, so 0.16 and 40% are the same. Tools display it differently, so decimals avoid confusion.
Once the syntax is clear, enter the same value in the palette tab and compare.
Open the toolBasis date 28 November 2026. Written against the W3C specifications, the APCA documentation and published browser support tables; updated when they change.
Back to the guides