One color, every format
Designers hand over HEX codes, CSS wants rgb() or hsl(), print shops ask for CMYK and modern stylesheets use OKLCH. Enter a color in any of those formats — or a CSS name like tomato — and the converter shows it as HEX, RGB, HSL, OKLCH, HSV/HSB, CMYK and a decimal integer, each ready to copy.
Transparency is supported: an 8-digit HEX such as #3b82f680 or an rgba() value carries its alpha through to every format. Below the results, a WCAG contrast check shows how white and black text read on your color, so you can pick an accessible text color in seconds.
How to convert a color code
- 1
Enter a color
HEX, rgb(), hsl(), oklch(), cmyk() or a name — or use the picker.
- 2
Read every format
All conversions update as you type.
- 3
Check contrast
See whether white or black text passes WCAG.
- 4
Copy what you need
One click per format.
Key features
Seven formats
HEX, RGB, HSL, OKLCH, HSV, CMYK and decimal.
Alpha support
8-digit HEX, rgba() and hsla().
WCAG contrast
Ratios and AA/AAA results for white and black text.
Color picker and random colors
Explore visually when you don't have a code yet.
Common uses
- Web design: Turn a brand HEX into HSL or OKLCH for CSS variables.
- Print: Get approximate CMYK values for a designer or printer.
- Accessibility: Choose text colors that meet WCAG AA.
Tips and good to know
- OKLCH keeps perceived lightness even as you change hue, which makes it great for building color palettes.
- CMYK values are approximate; printers convert using their own color profiles.
- Turn two colors into a gradient with the CSS Gradient Generator.
