HEX, RGB, HSL, OKLCH, LAB and CMYK
- Free
- No sign-up
- No upload
- Works offline
Tool facts
- Price
- Free, no sign-up, no watermark
- Are files uploaded?
- No. Everything is processed in this browser, on your device.
- Offline use
- Works without a connection once this page has loaded
- Browser
- A recent Chrome, Edge, Firefox or Safari, on computer or phone.
Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.
About Color Converter
Color Converter translates one color into every common format at once: HEX, 8-digit HEX with alpha, RGB and RGBA, HSL and HSLA, HWB, OKLCH, OKLab, CIE LAB, LCH and CMYK. Type or paste a value in any of these notations, a CSS color name such as rebeccapurple, or pick a color with the native picker, and all the other formats update immediately with a live swatch.
Every row is editable, so you can paste an rgb() value from a stylesheet, tweak the OKLCH lightness by hand and copy the HEX code back out. LAB and LCH use the D50 white point defined by CSS Color 4, so the values match what browsers render. Colors outside the sRGB gamut, such as very saturated OKLCH values, are brought into range by lowering chroma while keeping lightness and hue. The side panel shows relative luminance and the contrast ratio against white and black.
Color Converter runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.
How to use Color Converter
- Type a color in the top box (for example #3b82f6, rgb(59 130 246) or oklch(0.62 0.19 260)), or click the color square to use the picker.
- Drag the Alpha slider to add transparency; the HEX8, RGBA and HSLA rows show the alpha value.
- Edit any row in the Formats list directly; the other rows follow as soon as the value is valid.
- Turn on Modern CSS syntax if you want space-separated rgb() and hsl() values.
- Click Copy next to the format you need.
Frequently asked questions
How do I convert HEX to RGB?
Each pair of hexadecimal digits is one channel from 0 to 255: #3b82f6 is 3b = 59 red, 82 = 130 green and f6 = 246 blue, so it equals rgb(59, 130, 246). Paste the HEX code into the tool and copy the RGB row.
What is OKLCH and why use it?
OKLCH describes a color by perceived lightness (0 to 1), chroma (colorfulness) and hue angle. Unlike HSL, equal steps in lightness look equally different to the eye, which makes it well suited to building shade scales and accessible palettes. All current browsers support oklch() in CSS.
Why does the CMYK value not match my print software?
The CMYK shown here is the simple device conversion from RGB. Professional print workflows use ICC profiles such as FOGRA39 or GRACoL, which account for paper and ink, so their numbers differ. Use these values as a starting point and proof the final colors with your printer.
What happens with colors outside the sRGB gamut?
OKLCH, LAB and LCH can describe colors that a standard sRGB screen cannot show. When you enter one, the tool keeps its lightness and hue and lowers the chroma until it fits, then shows a note that the color was mapped. The HEX and RGB values are the closest displayable equivalent.
Is anything sent to a server?
No. All conversions are calculated with JavaScript in your browser, so the tool works offline once the page has loaded.