Name your color.
Ship the right format.
Convert one color between HEX, RGB, HSL, and CMYK. Pick a swatch, copy CSS-ready values, and check a text/background contrast ratio without uploading anything.
How do I convert HEX to RGB? Paste a HEX, RGB, or HSL value and the other formats update instantly, with a live swatch and contrast hint.
Color converter
Enter a 3- or 6-digit HEX value such as #4F46E5.
#4F46E5rgb(79, 70, 229)hsl(243, 75%, 59%)cmyk(66%, 69%, 0%, 10%)Would text stand out?
Change the background swatch to test the selected color as text. This is a WCAG ratio hint, not a full design audit.
#FFFFFFHEX, RGB, and HSL describe the same screen color in different coordinate systems. CMYK here uses standard sRGB math and is only a screen preview; print production should use the printer's ICC profile.
How to convert between color formats
- Enter the color — HEX, RGB, HSL, or CMYK, any direction.
- Read every format at once — with a live swatch and a contrast hint.
- Copy the value the destination needs — CSS, design tool, or printer.
Which format to use where
- HEX for web code; RGB when scripting or using APIs
- HSL when you intend to tweak lightness or saturation by hand
- CMYK only as a starting estimate for print — real conversions need ICC profiles
Good to know
On-screen CMYK conversions are approximations; print colors depend on ink, paper, and profile, so never promise a print match from a hex value. The contrast hint uses the WCAG idea that normal text wants roughly 4.5:1 against its background — it is worth checking before shipping any color pair. Related: palette extractor and gradient generator.
Which formats are supported?
The converter accepts a 3- or 6-digit HEX value and editable RGB or HSL channels. It shows matching HEX, RGB, HSL, and CMYK output with one-click copy buttons.
Is CMYK exact for printing?
No. The CMYK value is a standard mathematical conversion from sRGB for orientation. A print workflow should use the destination printer or press ICC profile.
Does the color leave my browser?
No. Conversion, contrast math, and copy-ready output are generated in this page with local JavaScript. No color data is sent to a server.