Color Converter

Convert a colour between HEX, RGB, HSL and CMYK, with the equivalent values shown in every format at once.

What the Color Converter does

The same colour has several representations. RGB describes it as additive light, HSL as hue with saturation and lightness, and CMYK as subtractive ink. Converting between them is exact for RGB and HSL, but CMYK depends on the output device.

Formula

  • HEX to RGB: each pair of hex digits is one channel, 0–255
  • L = (max + min) ÷ 2
  • S = (max − min) ÷ (1 − |2L − 1|)
  • K = 1 − max(R, G, B); C = (1 − R − K) ÷ (1 − K)

Inputs explained

InputUnitRequiredNotes
Input formatone of 3 optionsYes
HEX colourtextIn some modesShown Input format is HEX.
RednumberIn some modesAccepts 0 or more, up to 255. Shown Input format is RGB.
GreennumberIn some modesAccepts 0 or more, up to 255. Shown Input format is RGB.
BluenumberIn some modesAccepts 0 or more, up to 255. Shown Input format is RGB.
Hue°In some modesAccepts 0 or more, up to 360. Shown Input format is HSL.
Saturation%In some modesShown Input format is HSL.
Lightness%In some modesShown Input format is HSL.

How to use it

  1. Choose Input format.
  2. Fill in the remaining inputs the form shows for your choice.
  3. Select Calculate.

Worked example

Converting the hex colour #3B82F6.

HEX
#3B82F6

rgb(59, 130, 246), which is hsl(217, 91.2%, 59.8%) and CMYK 76%, 47.2%, 0%, 3.5%.

Frequently asked questions

Why does the same colour look different in print?

Screens emit light additively in RGB; print absorbs it subtractively in CMYK. Many vivid RGB colours simply cannot be reproduced with ink, so they shift on conversion.

What is the three-digit hex shorthand?

#38F expands to #3388FF — each digit is doubled. It only reaches 4,096 colours instead of 16.7 million.

Related calculators