Color Converter
Four notations for the same light
Every colour on a screen is three intensities of red, green and blue light. The four formats on this page are four ways of writing that fact down, each optimised for a different reader. HEX is RGB compressed into six base-16 digits — #FF5733 is FF (255) red, 57 (87) green, 33 (51) blue — compact, copyable, and the lingua franca between design tools, which is why it is the format colours travel in. RGB spells the same channels in decimal, the natural form when a program generates the values. HSL re-describes the colour as hue (position on the colour wheel), saturation (how much colour versus grey) and lightness (black to white) — the only one of the four a human can reason about directly. HSV keeps the hue but swaps lightness for value, the model most colour pickers in graphics software are built on. Converting between them is exact arithmetic using the standard CSS formulas; nothing about the colour changes, only its description.
The practical question is which format to work in, and the answer follows from who touches the value next. Ship hex when the colour is final: it is unambiguous and pastes cleanly anywhere. Work in HSL whenever the colour is not final, because its axes are the adjustments humans actually make — a hover state is the same hue at ten points less lightness, a muted variant is the same hue at lower saturation, a whole palette is one saturation and lightness swept across hues. Deriving a darker shade in RGB means scaling three channels proportionally in your head; in HSL it means editing one number. HSV matters mainly when a design tool reports it: its saturation and value are not HSL's saturation and lightness, and mixing the two systems' numbers is a quiet source of "the colour looks washed out" bugs.
The tint and shade strip under the inputs mixes the current colour 10 percent at a time toward white (tints) or black (shades) — the raw material of button states and table stripes. Click-to-copy on every format exists because conversion is usually a means to an end, a value pasted into a stylesheet or design file, and every manual retyping of six hex digits is a chance to transpose two of them.
Worked examples
A warm orange-red. #FF5733: the hex pairs read straight off as rgb(255, 87, 51). Its hue sits at 11 degrees (just past red, toward orange), the colour is fully saturated, and its lightness computes to exactly 60 percent: hsl(11, 100%, 60%). In HSV the same colour is hsl's hue with 80% saturation and 100% value — same colour, different ruler.
Dodger blue. #1E90FF = rgb(30, 144, 255) = hsl(210, 100%, 56%). The hue of 210 degrees is the giveaway that this is a true blue leaning slightly toward cyan, and the 56 percent lightness — just above the midpoint — matches how bright it looks against white. Darken it for a hover state by dropping lightness to about 46 percent and the hue and saturation carry over untouched; that one-number edit is the whole argument for HSL.
The formats side by side
| Colour | HEX | RGB | HSL |
|---|---|---|---|
| Orange-red | #FF5733 | rgb(255, 87, 51) | hsl(11, 100%, 60%) |
| Dodger blue | #1E90FF | rgb(30, 144, 255) | hsl(210, 100%, 56%) |
| Pure red | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Black | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
The last two rows explain a quirk you will meet in pickers: white and black have no hue, so their hue and saturation are reported as 0 by convention. Greys live at 0 percent saturation with lightness doing all the work — which is also why a "grey" that looks slightly blue is telling you its saturation is not quite zero.
Notes: rounding and colour spaces
HEX to RGB is lossless — the channels are the same numbers in a different base. HSL and HSV are where rounding lives: hue is conventionally rounded to whole degrees and the percentages to whole numbers, so converting RGB to HSL and straight back can move a channel by one unit out of 255. That is far below visibility, but it means code that compares colours for equality should compare the RGB or hex values, not a round-tripped HSL. Everything on this page is sRGB, the web's colour space; print (CMYK) and wide-gamut Display-P3 colours are different worlds with their own conversions, and a hex value carried into print is an approximation by definition.
Frequently asked questions
What is the difference between HSL and HSV?
They share the same hue wheel but measure the colour differently after that. HSL uses saturation and lightness, where lightness runs from black (0%) through the pure colour (50%) to white (100%). HSV (also called HSB) uses saturation and value/brightness, where 100% value is the pure colour at full intensity and black is value 0%. The same colour therefore has different numbers in each: #FF5733 is hsl(11, 100%, 60%) but hsv(11, 80%, 100%). Design tools disagree about which they show, so check the label before copying numbers across.
Why is HSL easier to adjust by eye than RGB?
Because HSL's axes match how people describe colours. Want it darker? Lower the lightness — in RGB that means reducing all three channels in the right proportions, which nobody can do mentally. Want it muted? Lower the saturation. Want the same feel in another hue? Change one number. RGB describes how a screen mixes light, which is a machine's view; HSL describes the colour itself, which is why designers build palettes, hover states and shades in HSL (or its modern cousin OKLCH) even when the final CSS ships as hex.
When should I use hex, and when rgb() or hsl() in CSS?
Hex is the compact default for a single, fixed colour and the format design tools exchange most often. rgb() earns its place when you need the alpha channel in the older syntax or are generating values from JavaScript numbers. hsl() is the right choice whenever a human will tweak the value later — themes, state colours, anything derived by lightening or darkening — because the tweak is one number. All three describe the same sRGB colours; the choice is about who edits the value next, not about correctness.
Does #FF5733 have an exact RGB and HSL equivalent?
Yes: #FF5733 is rgb(255, 87, 51) exactly — hex channels are just RGB written in base 16, so that direction never rounds. Its HSL is hsl(11, 100%, 60%): the hue computes to 11 degrees, saturation to 100% and lightness to exactly 60%. Going back from rounded HSL to RGB can shift a channel by one unit, which is invisible in practice but worth knowing if you are diffing colour values in code review.
Why do colours look different on my phone and my monitor?
Because the numbers describe light intensities in the sRGB space, and screens reproduce that space with different accuracy, brightness and white points — and some modern phones and browsers also handle wider Display-P3 colours. The converted values on this page are exact; their appearance is not guaranteed. For brand-critical work, check the colour on a calibrated screen and in print proof, and never approve a colour from a single uncalibrated display.
Related tools
Conversion formulas and worked examples last verified: 24 November 2026. Everything is calculated in your browser — nothing you type is sent anywhere.