Color Converter
Convert any color between HEX, RGB, HSL, HSV, HWB, CMYK, LAB, LCH and OKLCH. Paste a code, see the color and copy every format in one click.
Examples:
Conversions
CMYK is a naive conversion without an ICC profile. Ask your printer for a profile-based conversion for print work.
How to use the color converter
- Type or paste a color in the Input field. The format is detected automatically:
#FF6347,FF6347,rgb(255 99 71),255, 99, 71,hsl(9 100% 64%),hsv(9, 72%, 100%),cmyk(0, 61, 72, 0),lab(63% 59 48),oklch(70% 0.2 32)or a name such astomato. - The conversions appear as you type. You can also press Enter or click Convert.
- Check the swatch: it shows the color and the Detected format, so you know how your input was read.
- Click Copy next to the format you need. Use the example buttons to try common inputs.
The conversion runs entirely in your browser.
Supported formats
| Format | Example | Typical use |
|---|---|---|
| HEX | #FF6347 |
HTML, CSS, design tools |
| RGB | rgb(255, 99, 71) |
CSS, code, image editors |
| HSL | hsl(9, 100%, 64%) |
CSS, adjusting lightness |
| HSV / HSB | hsv(9, 72%, 100%) |
Photoshop, Figma, pickers |
| HWB | hwb(9 28% 0%) |
CSS Color 4 |
| CMYK | cmyk(0%, 61%, 72%, 0%) |
print (see note below) |
| LAB (D50) | lab(62.99% 59.36 47.88) |
CSS lab(), color science |
| LCH | lch(62.99% 76.27 38.89) |
CSS lch() |
| OKLCH | oklch(69.62% 0.1955 32.32) |
modern CSS, design systems |
HEX, RGB, HSL, HWB, LAB, LCH and OKLCH outputs are valid CSS you can paste straight into a stylesheet. HSV and CMYK are not CSS notations, so they are written in the conventional function style for reading.
If your input has transparency (for example rgb(255 0 0 / 50%)), the converter keeps it: HEX becomes an eight-digit code such as #FF000080, and the other formats get an alpha value.
How the conversions work
RGB, HEX, HSL, HSV and HWB are different ways of writing the same sRGB values, so they convert exactly (up to rounding). LAB and LCH follow the CSS Color 4 definition, which uses the D50 white point with Bradford chromatic adaptation. Some online converters use D65 instead, so their LAB numbers can differ by a few units for the same color. OKLCH uses Björn Ottosson’s Oklab model, the one browsers use for oklch().
When you enter a LAB, LCH or OKLCH color that is too saturated for a normal screen, it lies outside the sRGB gamut and has no HEX equivalent. The tool then shows a message and maps it to the closest displayable color by reducing its chroma while keeping lightness and hue.
CMYK is an approximation
The CMYK values use the naive formula K = 1 − max(R, G, B) and C = (1 − R − K) / (1 − K), with the same for M and Y. There is no ICC profile involved, so the numbers do not predict what a given press will print. For professional print work, convert in your layout software with the profile supplied by your printer (for example FOGRA39 or GRACoL). Converting CMYK back to RGB uses the inverse formula, R = (1 − C)(1 − K).
Frequently asked questions
How do I convert HEX to RGB by hand?
Split the code into three pairs and convert each from base 16 to base 10. For #FF6347: FF = 255, 63 = 99, 47 = 71, so the color is rgb(255, 99, 71).
What is the difference between HSL and HSV?
Both use a hue angle and a saturation, but HSL’s third value is lightness (50% is the pure color, 100% is white) while HSV’s is value or brightness (100% is the pure color or white, depending on saturation). The same color therefore has different saturation numbers in each model.
Why is my LAB value different from another converter?
Most likely because of the white point. This tool uses D50, like CSS lab(). Converters based on D65 give slightly different numbers. Both are correct in their own reference.
Can I convert CMYK to HEX?
Yes. Type something like cmyk(0%, 61%, 72%, 0%) or cmyk(0, 0.61, 0.72, 0). Keep in mind that the result is an approximation without a color profile.
Does it accept colors without the # sign?
Yes. ff6347, f64 and even three numbers separated by commas, such as 255, 99, 71, are recognized.
Related tools
- Color Picker Free online color picker. Choose any color and instantly copy its HEX, RGB, HSL, HSV and CMYK codes, with contrast ratios against white and black.
- Color Palette Generator Generate color palettes from one base color using color harmony rules - complementary, analogous, triadic, tetradic, square and monochromatic.
- Image Color Picker Upload an image and click any pixel to get its color as HEX, RGB, HSL, HSV and CMYK. Zoom loupe, averaging and a list of picked colors, all in your browser.