Color Converter

Hex to RGB, HSL, and CMYK with one input.

Technology and NetUpdated 2026-10-101 min read
Color Converter
6 digits like #FF8000.
RGB
...
HSL...
CMYK...

What it does

Color conversion rewrites one color across notation systems: hex packs channels into digits, RGB lists them plainly, HSL describes hue with saturation and lightness, and CMYK splits ink for print. All four name the same on screen color.

The tool above takes a six digit hex color. It returns RGB with HSL and CMYK beside them, each in standard notation.

The default red #FF0000 reads rgb(255, 0, 0), hsl(0, 100%, 50%), and CMYK 0/100/100/0. Green lands at hue 120 and blue at 240 with full saturation by the same rotation.

Formats follow W3C CSS Color specifications with MDN color references matching the conversion code. Both treat hex pairs as 0 to 255 channels under the sRGB space.

How to use

  1. Enter six hex digits with or without the hash.
  2. Read RGB first for screens and code.
  3. Read HSL for picking shades and tints.
  4. Read CMYK for print estimates.
  5. Copy the notation your tool accepts.

Formula

Channels = hex pairs to 0-255. Hue rotates by max channel; lightness averages max with min. CMYK inverts against black key.
FF
255 in decimal, full channel.
hue
0 red, 120 green, 240 blue degrees.
K
Black key: one minus max channel.

Six digit hex only; shorthand expands first (#F00 means #FF0000). Alpha channels sit outside this page.

Worked example

Example: #FF0000

Default red hex.

  1. Channels: FF is 255, 00 is 0: rgb(255, 0, 0).
  2. Max red, delta full: hue 0, saturation 100%, lightness 50%.
  3. Key: 1 - 1 = 0. Ink: cyan 0, magenta 100, yellow 100.
  4. Result: hsl(0, 100%, 50%), CMYK 0/100/100/0.
  5. Tool shows all three notations.

Reference table

Primary colors compared
HexHSL hueCMYK
#FF00000°0/100/100/0
#00FF00120°100/0/100/0
#0000FF240°100/100/0/0
#8080800° gray0/0/0/50

Limits

  • sRGB only; wide gamuts need other spaces.
  • Six digit hex input only.
  • CMYK estimates vary by press profile.
  • Alpha transparency excluded.

Common mistakes

  • Reading shorthand without expanding digits.
  • Mixing 0-255 with 0-100% channel scales.
  • Trusting screen CMYK for press proofs.
  • Forgetting hash optional here but required in CSS.
  • Expecting hue on grays (zero saturation).

Try it yourself

Quick checks. Answers sit tucked under each question.

#00FF00?

rgb(0, 255, 0), hsl(120, 100%, 50%).

#000000?

rgb(0, 0, 0), CMYK 0/0/0/100.

#808080 CMYK?

Mid gray: 0/0/0/50.

Questions

How do you convert hex to RGB?

Split pairs to decimals: #FF0000 is rgb(255, 0, 0).

What is HSL?

Hue degrees with saturation and lightness percents: red is hsl(0, 100%, 50%).

Why CMYK too?

Printers mix cyan, magenta, yellow, black inks instead of light.

Do browsers accept all?

Yes for hex, rgb, and hsl in modern CSS.

What about transparency?

Alpha rides in rgba/hsla or 8 digit hex, outside this page.

Which for picking shades?

HSL: hold hue, slide lightness for tints and shades.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.