Color Converter
Converters ยท Added 18 August 2026
Paste a colour in whatever notation you have it in โ a hex code from a design file, an rgb() from a stylesheet, an hsv() from a colour picker, a cmyk() from a print spec โ and every other notation appears at once, along with the decimal and float forms that native and graphics code use. The nearest CSS colour name is named honestly, as an exact match or merely the closest one.
Conversions
Hex
#1d4ed8
Nearest CSS colour name: royalblue (#4169e1) โ close, not identical.
Every notation
- Hex
- #1d4ed8
- RGB
- rgb(29, 78, 216)
- RGB (modern CSS)
- rgb(29 78 216)
- HSL
- hsl(224, 76%, 48%)
- HSV / HSB
- hsv(224, 87%, 85%)
- CMYK
- cmyk(87%, 64%, 0%, 15%)
- Decimal
- 1920728
- Float (0โ1)
- 0.1137, 0.3059, 0.8471
- Red
- 29
- Green
- 78
- Blue
- 216
- Hue
- 224ยฐ
- HSL saturation / lightness
- 76% / 48%
- HSV saturation / value
- 87% / 85%
- Alpha
- Opaque
- Key (black)
- 15%
11%
31%
85%
Shared by HSL and HSV
Not interchangeable with HSL
CMYK ink coverage
Hue relationships
The same colour with its hue rotated, holding saturation and lightness steady. These are positions on the hue wheel, not a recommendation โ whether a pair works depends on how much of each you use and what sits between them.
Complementary
#1d4ed8
#d8a71d
Opposite hues. Maximum separation, which is why it reads as emphasis rather than as a palette.
Analogous
#1dacd8
#1d4ed8
#491dd8
Neighbouring hues. Low contrast between them, so they sit together without competing.
Triadic
#1d4ed8
#d81d4e
#4ed81d
Three evenly spaced hues. Balanced, and usually needs one to dominate.
Split complementary
#1d4ed8
#d8491d
#acd81d
The complement, split in two. Keeps the contrast and softens the clash.
HSL and HSV share a hue and nothing else โ 50% HSL lightness is 100% HSV value for a pure hue, so the two sets of numbers are not interchangeable. The CMYK figures are the standard arithmetic conversion, which is what image editors and CSS tools use; they are not a print prediction, because real print output depends on an ICC profile for a specific press, paper and ink set.
How to use the color converter
- 1Type or paste a colour: hex, rgb(), rgba(), hsl(), hsv(), hsb(), cmyk() or a CSS colour name. The picker beside the field works too.
- 2Read the conversions. Each row is a complete value you can paste straight into a stylesheet, a design tool or source code.
- 3Use the copy button on any row, or the hex button at the top for the value on its own.
- 4Check the hue relationships below the numbers if you need variations of the same colour rather than the colour itself.
Examples
A hex code from a design file
- Input
- #1d4ed8
- Result
- rgb(29, 78, 216) - hsl(224, 76%, 48%) - hsv(224, 87%, 85%) - cmyk(87%, 64%, 0%, 15%)
An HSV value from a colour picker
- Input
- hsv(210, 80%, 90%)
- Result
- #2e79e5 - rgb(46, 121, 229)
CSS has no hsv() function, which is why a value copied out of a picker has to be converted before it can be used.
A translucent colour
- Input
- rgba(0, 0, 0, 0.5)
- Result
- #00000080 with the alpha kept, and rgb(0 0 0 / 0.5) in modern CSS syntax
About the color converter
Why one colour needs five notations
Each notation exists because it makes a different job easy. Hex is compact and unambiguous, which is why stylesheets and design files use it. RGB matches how a screen actually emits light. HSL and HSV are the ones you can reason about โ to make a colour lighter you change one number, rather than guessing at three. CMYK describes ink on paper, where colour is subtractive rather than additive.
None of them is more correct than the others, and all of them here describe the same three channels. What matters is that the conversion between them is exact in one direction and rounded in the other: hex to RGB is lossless, while HSL and HSV round to whole degrees and percentages, so converting out and back can move a channel by a value or two.
Additive and subtractive colour
A screen starts black and adds light: red, green and blue at full strength give white. Ink starts with white paper and subtracts light: cyan, magenta and yellow together should give black and in practice give a muddy brown, which is why printing adds a separate black ink โ the K in CMYK, for key.
This is why the gamuts do not line up. A saturated screen blue or a bright green has no ink equivalent, and a conversion can only produce the closest printable approximation. It is also why a design that looks right on a monitor can look flat in print, and why print work is proofed rather than trusted to a conversion.
Reading a hex code
Six digits are three pairs, each a channel from 00 to ff, which is 0 to 255 in decimal. Once you can see the pairs, a code stops being opaque: equal pairs are always a neutral grey, a high first pair with low others is a red, and adding the same amount to all three lightens without shifting the hue.
The three-digit shorthand doubles each digit, so #1a2 means #11aa22 rather than anything more subtle. That is worth knowing because it limits the shorthand to 4,096 of the 16.7 million possible colours โ fine for a quick sketch, and a reason not to convert a real value into it.
Frequently asked questions
What is the difference between HSL and HSV?
Will the CMYK values match what my printer produces?
Why does the hex value sometimes have eight digits?
Is the nearest colour name the same colour?
What are the decimal and float rows for?
Do the hue relationships tell me which colours to use?
Related tools
Color Contrast Checker
Developer Tools
Check any two colours against the WCAG contrast thresholds, with passing shades suggested.
CSS Unit Converter
Converters
Convert px, rem, em, pt, %, vw and vh against a root font size you set.
Number Base Converter
Converters
Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36.