Four notations, one colour
Colour on a screen is just three numbers — how much red, green and blue light to mix — but the industry writes those numbers four different ways, and real work keeps handing you the wrong one: a brand guide in HEX, a design tool reporting HSB, a CSS file in HSL, a bug report with a raw rgb() triple. This converter takes any of the four and gives you back all of them at once, with a preview large enough to judge. Paste a notation, drag the picker, or type channel values — every representation updates together, because they are the same colour wearing different clothes.
How to use this tool
- Type or paste a colour in any notation —
#4F46E5,rgb(79, 70, 229),hsl(243, 75%, 59%),hsv(243, 69%, 90%)— or use the picker to explore by eye. - Check the preview swatch before trusting the numbers: it is rendered from the same values as the rows, so a mix-up between HSL and HSV shows up immediately as a colour that is clearly too bright or too dark.
- Copy the row you need. Each format has its own button and is written the way CSS expects it, so it pastes straight into a stylesheet.
- If an input is rejected, the message says why — a channel over 255, a percentage over 100 — rather than silently clamping your colour into a different one.
What each notation is actually saying
HEX is RGB in a trench coat: three bytes written
in base 16, prefixed with #. #4F46E5 is red 0x4F
(79), green 0x46 (70), blue 0xE5 (229). Nothing is gained or lost
versus RGB, which writes the same three channels
in decimal — the two are interchangeable and both describe the
hardware directly. HSL re-describes the same
point by hue (position on the colour wheel, in degrees),
saturation (how far from grey), and lightness (0% black, 50% the
pure hue, 100% white). HSV — also called HSB,
the B standing for brightness — keeps hue and saturation but
swaps lightness for value: 0% is black and 100% is the pure hue,
full stop, with white unreachable by that dial alone. That single
difference is responsible for a remarkable share of the world's
"the colour looks wrong" bugs, because the two systems share two
of their three numbers and quietly disagree about the third.
Rounding, and other honest limits
Conversions here are exact up to display rounding: HSL and HSV percentages and degrees are shown as whole numbers, so turning HEX → HSL → HEX by hand can land a step or two off on a channel (a green of 70 coming back as 72, via the rounded HSL values). Inside this page the canonical value is the RGB triple, and every row is rendered from it, so the four rows never disagree with each other — the drift only appears if you round-trip the rounded numbers yourself. The picker your browser provides works in RGB and may quantise what it returns; the text box is the precise way in. And this page converts opaque colours only: alpha belongs to compositing, which needs a background to mean anything.