Color Converter
Enter a colour in any format to get it in every other — HEX, RGB, HSL, HSV, CMYK and OKLab — plus the nearest CSS colour name.
Result
Enter a colour in any format.
How to use this tool
- Type a colour in any format —
#0F766E,rgb(15, 118, 110),hsl(175, 77%, 26%),cmyk(87%, 0%, 7%, 54%)or a name liketeal— or use the colour picker. - Every other format is shown with a swatch. Click the swatch to copy the HEX code.
- Transparent colours (such as
#FF000080orrgb(255 0 0 / 50%)) are supported.
How it works
All formats are converted through RGB:
- HEX is RGB written in base 16 (two digits per channel).
- HSL and HSV describe the same colour as hue (0–360°), saturation and lightness or value.
- CMYK here is the simple formula K = 1 − max(R, G, B), C = (1 − R − K) ÷ (1 − K), and so on.
- OKLab is a modern perceptual colour space used for even colour mixing.
- The nearest CSS name uses a weighted RGB distance that roughly matches how people perceive colour differences.
Example
Teal-green
#0F766E = rgb(15, 118, 110) = hsl(175, 77%, 26%) = CMYK 87%, 0%, 7%, 54%. The nearest CSS name is teal (#008080).
Privacy and limitations
- Conversions happen in your browser.
- HSL and HSV values are rounded to whole numbers, so converting back can differ by one unit from the original.
- Real print colours depend on the printer’s colour profile; the CMYK values here are a starting point, not a print proof.
Frequently asked questions
What is the difference between HSL and HSV?
Both use hue and saturation. In HSL, 100% lightness is always white; in HSV (also called HSB), 100% value is the brightest version of the hue.
What do 8-digit HEX codes mean?
The last two digits are the alpha (opacity). #FF000080 is red at about 50% opacity.