Color Picker
Use Color Picker to choose and convert color precisely — instant and free.
Convert an HSL colour — hue, saturation and lightness — into a hex code for CSS and design tools, with a live swatch. Runs in your browser.
Your browser is preparing the tool. It runs 100% locally.
Enter an HSL colour — a hue in degrees, plus saturation and lightness as percentages — and the tool gives you the matching hex code, with a swatch so you can see it. HSL is easy to reason about (rotate the hue, lighten or darken with the lightness), while hex is what CSS and most design tools expect, so this bridges the two. It is the inverse of the hex-to-HSL converter. It runs entirely in your browser.
Type the three HSL numbers — for example 199, 89, 48 — and you get the hex code for that colour straight away, shown on a live swatch. It is the quick way to turn a colour you have tuned in HSL into the hex value your stylesheet or design app wants.
HSL describes a colour by its hue (its position on the colour wheel), its saturation (how vivid it is) and its lightness (how light or dark). Those are intuitive to adjust by hand; this converter turns the result into the more universally accepted hex form.
The tool converts your HSL values to red, green and blue using the standard HSL-to-RGB algorithm, then writes those three channels as a six-digit hex code. The hue wraps around the colour wheel, and the saturation and lightness percentages scale the vividness and brightness.
It is the exact inverse of converting hex to HSL: feed the hex code from this tool back into a hex-to-HSL converter and you get your original HSL values, give or take the tiny rounding that happens when colours are stored as whole-number channels.
1. read HSL — hue 0-360, saturation and lightness 0-100%
2. convert to RGB — each channel 0-255
3. write RGB as a six-digit hex codeHSL 199, 89%, 48% → RGB 13, 162, 231 → hex #0DA2E7The inverse of hex-to-HSL; a tiny rounding can occur because hex stores whole-number channels.
| Input | HSL (hue 0-360, saturation and lightness 0-100%) |
|---|---|
| Output | six-digit hex code (uppercase) |
| Method | standard HSL-to-RGB then RGB-to-hex |
| Swatch | live colour preview |
| Inverse of | the hex-to-HSL converter |
| Where it runs | In your browser — nothing uploaded |
It uses the standard HSL-to-RGB conversion, so the result matches CSS and other tools. The hex is the exact colour for your HSL values, shown on the swatch.
A tiny rounding can occur. Hex stores each channel as a whole number from 0 to 255, so converting HSL to hex and back may shift a value by one, which is invisible to the eye.
Hue wraps around the wheel. A hue of 360 is the same as 0 (red), and values beyond the usual range are interpreted around the circle, so the colour stays valid.
Saturation and lightness are percentages. At 0% saturation the colour is a grey set by the lightness; at 0% or 100% lightness it is black or white regardless of hue.
It converts colour values, not appearance. The same hex can look slightly different on different screens because of their colour calibration; the conversion itself is exact.
Turn an HSL colour you tuned into the hex your stylesheet wants.
Give developers a hex code from an HSL value.
Shift hue or lightness in HSL, then get the hex.
See how an HSL colour maps to its hex code.
Going the other way? Use the hex-to-HSL converter. Need transparency? Use an HSLA-to-hex tool that includes the alpha channel. Want perceptual lightness control? An OKLCH tool is better suited.
Converts HSL (hue 0-360, saturation and lightness 0-100%) to a hex code using the standard HSL-to-RGB algorithm; it is the inverse of the hex-to-HSL converter and is explicit that a one-step rounding can occur because hex stores whole-number channels, and that it handles solid (non-transparent) colours.
Use Color Picker to choose and convert color precisely — instant and free.
Use HEX to RGB Converter to choose and convert color precisely — instant and free.
Use Color Palette Generator to choose and convert color precisely — instant and free.
Use Gradient Generator to choose and convert color precisely — instant and free.
Use Contrast Checker to choose and convert color precisely — instant and free.
RGB to HEX Converter with copy-ready values for design and front-end work.
It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.