Color Converter
← All toolsType a color into any field and the other seven rewrite themselves at once. The oklch(), lch(), lab() and hwb() rows copy as complete CSS functions that a stylesheet accepts as they are.
That value did not parse. Check the format and try again.
How to use the Color Converter
- Type or paste a value into any field: HEX like #2fe6d9, RGB like 47, 230, 217, HSL like 174, 74%, 54%, or a whole CSS function such as oklch(62% 0.19 260).
- The other fields and the preview swatch update as you type.
- If a field turns red, the value did not parse. Check for stray characters or a missing # or % sign.
- Click Copy next to the format you need.
FAQ
- What formats does the RGB field accept?
- Comma-separated numbers 0–255, for example “47, 230, 217”. A whole rgb() or rgba() function works too, in either the comma or the space syntax.
- Does the HSL field need the % signs?
- Yes, for saturation and lightness, for example “174, 74%, 54%”. That matches how HSL is written in CSS.
- Can I convert 3-digit HEX shorthand like #2ec?
- Yes. Shorthand hex is expanded automatically.
- Which white point do lab() and lch() use?
- D50, as the CSS Color Level 4 specification requires. The site converts sRGB to XYZ under its own D65 white and adapts to D50 with a Bradford transform, so a pasted lab() renders as the same color in a browser.
- Which OKLCH definition is this?
- Björn Ottosson's 2020 OKLab, with the matrices the CSS specification cites. Chroma is shown to four decimals because three is not enough to round-trip saturated colors at the edge of sRGB.
- Is the CMYK a print profile?
- No. It is the plain formula that most design tools show, with no ICC profile. Use it as a starting point and check a proof.
- Does this store or send my colors anywhere?
- No. The conversion runs in your browser and makes no network requests.