Color Converter
Free color converter: turn HEX into RGB, HSL and CMYK (and back) with a color picker, copy any value in one click and check text contrast on white and black.
Everything happens in your browser. Nothing is uploaded.
One colour, every format you need
A brand guide gives you a CMYK value for print, the designer sends a HEX code, your CSS uses hsl(), and the slide software wants RGB numbers. They all describe the same colour in different ways. This converter takes any one of them and writes out all the others, and it also checks how readable text in that colour would be on white and on black.
How to use it
- Type a value into Color: HEX like
#2155D9or short#fff,rgb(33, 85, 217),hsl(223, 74%, 49%)orcmyk(85%, 61%, 0%, 15%). Or use Pick a color to choose visually. - Read the Color values list, which shows HEX, RGB, HSL and CMYK together.
- Press Copy beside the format you need.
- Check the contrast line underneath before using the colour for text.
Worked example
Entering #2155D9, a strong blue, gives rgb(33, 85, 217), hsl(223, 74%, 49%) and cmyk(85%, 61%, 0%, 15%). The contrast check reports 6.24:1 on white and 3.37:1 on black, so blue text reads better on a white background and passes the WCAG AA threshold of 4.5:1 for body text. A bright yellow such as #FFCC00 is the opposite: 1.51:1 on white, far too faint, but 13.89:1 on black. That is why yellow warning signs use black lettering.
Notes on the formats
- HEX and RGB are two spellings of the same three numbers from 0 to 255.
- HSL describes hue (0–360°), saturation and lightness, which makes it easy to create lighter or darker shades by changing one number.
- CMYK here is a simple mathematical conversion. Real print colours depend on the paper and the printer’s colour profile, so ask the print shop for a proof when exact colour matters.
- Values are rounded to whole numbers, so converting back and forth can shift a channel by one.
Building a web page with these colours? Shrink the finished stylesheet with HTML / CSS / JS Minifier. Need a logo in another format? Image Converter turns SVG into PNG.
Frequently asked questions
What contrast ratio do I need for text?
WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text (about 24 px, or 19 px bold). AAA asks for 7:1.
Why does my printed colour look different?
Screens mix light (RGB) while printers mix ink (CMYK). Some bright screen colours cannot be printed at all; the conversion gives a starting point, not a guarantee.
Does it support transparency?
The tool works with solid colours. You can paste rgba() or an 8-digit HEX code, but the alpha part is ignored and only the solid colour is converted.
Can I paste a colour name like “red”?
Use one of the four supported formats. For named colours, pick them with the colour picker or look up their HEX value.
Is anything sent to a server?
No. Conversion and contrast calculation run in your browser.