Designers, developers and printers describe colours in different systems: HEX and RGB for screens, HSL and HSV for picking shades, CMYK for print. This converter translates between all of them and checks text contrast for accessibility.
How to use the Color Converter
- Input format
- Colour
Everything runs in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Your colour is parsed in the format you choose and converted to RGB first; every other notation is computed from RGB. CMYK here is a simple device-independent conversion; professional printing uses colour profiles that can shift the values.
Formula
HEX: each pair of hex digits = one RGB channel (00–FF = 0–255)HSL/HSV from RGB via the standard hexcone formulasCMYK: K = 1 − max(R,G,B)/255Worked example
Inputs — Input format: HEX (#RRGGBB); Colour: #1E90FF.
Results — HEX = #1E90FF; RGB = rgb(30, 144, 255); HSL = hsl(210, 100%, 56%); HSV / HSB = hsv(210, 88%, 100%); CMYK = cmyk(88%, 44%, 0%, 0%); Decimal value = 2,003,199.
Key terms
- HEX code
- A colour written as #RRGGBB in hexadecimal.
- Contrast ratio
- WCAG measure of luminance difference between text and background, from 1:1 to 21:1.
Frequently asked questions
How do I convert HEX to RGB?
Split the code into three pairs and convert each from base 16 to base 10: FF = 255.
What contrast ratio do I need for text?
WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
Can I enter a 3-digit HEX code?
Yes: #F80 is read as #FF8800.
What formula does the Color Converter use?
HEX: each pair of hex digits = one RGB channel (00–FF = 0–255).