HEX to HSL Converter
Updated Free mock REST & WebSocket APIs
Paste a hex code to get its HSL value, then fine-tune hue, saturation and lightness with the sliders — the hex updates as you go.
#ff6347#FF6347rgb(255, 99, 71)rgb(255 99 71)hsl(9, 100%, 64%)hsv(9, 72%, 100%)cmyk(0%, 61%, 72%, 0%)oklch(69.62% 0.1955 32.32)1.000, 0.388, 0.278🔒 Converted instantly in your browser. Need more control? Open the full color picker.
How to convert HEX to HSL
- Paste a hex code such as
#ff6347. - Copy the HSL result —
hsl(9, 100%, 64%)— or drag H, S and L to explore lighter, darker or muted versions.
The formula
- Convert hex to RGB and divide each channel by 255, so R, G and B are 0–1.
- Find max and min of the three and d = max − min.
- Lightness L = (max + min) ÷ 2.
- Saturation S = 0 if d = 0, otherwise d ÷ (1 − |2L − 1|).
- Hue: if max is R, H = 60 × ((G − B) ÷ d mod 6); if G, H = 60 × ((B − R) ÷ d + 2); if B, H = 60 × ((R − G) ÷ d + 4).
Example: #ff6347 → (1, 0.388, 0.278). max = 1, min = 0.278, d = 0.722. L = 0.639 → 64%. S = 0.722 ÷ (1 − 0.278) = 1 → 100%. Max is red, so H = 60 × (0.110 ÷ 0.722) ≈ 9°. Result: hsl(9, 100%, 64%).
Why designers like HSL
HSL lets you make a hover state by nudging lightness, or a disabled state by dropping saturation, without changing the hue. Beware that HSL lightness isn't perceptual — yellow at 50% looks much lighter than blue at 50%. For evenly spaced palettes use the OKLCH value shown above, or the palette generator.
CSS named colors in HSL
| Color | HEX | HSL |
|---|---|---|
| #f0f8ff | hsl(208, 100%, 97%) | |
| #faebd7 | hsl(34, 78%, 91%) | |
| #00ffff | hsl(180, 100%, 50%) | |
| #7fffd4 | hsl(160, 100%, 75%) | |
| #f0ffff | hsl(180, 100%, 97%) | |
| #f5f5dc | hsl(60, 56%, 91%) | |
| #ffe4c4 | hsl(33, 100%, 88%) | |
| #000000 | hsl(0, 0%, 0%) | |
| #ffebcd | hsl(36, 100%, 90%) | |
| #0000ff | hsl(240, 100%, 50%) | |
| #8a2be2 | hsl(271, 76%, 53%) | |
| #a52a2a | hsl(0, 59%, 41%) | |
| #deb887 | hsl(34, 57%, 70%) | |
| #5f9ea0 | hsl(182, 25%, 50%) | |
| #7fff00 | hsl(90, 100%, 50%) | |
| #d2691e | hsl(25, 75%, 47%) | |
| #ff7f50 | hsl(16, 100%, 66%) | |
| #6495ed | hsl(219, 79%, 66%) | |
| #fff8dc | hsl(48, 100%, 93%) | |
| #dc143c | hsl(348, 83%, 47%) | |
| #00ffff | hsl(180, 100%, 50%) | |
| #00008b | hsl(240, 100%, 27%) | |
| #008b8b | hsl(180, 100%, 27%) | |
| #b8860b | hsl(43, 89%, 38%) | |
| #a9a9a9 | hsl(0, 0%, 66%) | |
| #006400 | hsl(120, 100%, 20%) | |
| #a9a9a9 | hsl(0, 0%, 66%) | |
| #bdb76b | hsl(56, 38%, 58%) | |
| #8b008b | hsl(300, 100%, 27%) | |
| #556b2f | hsl(82, 39%, 30%) | |
| #ff8c00 | hsl(33, 100%, 50%) | |
| #9932cc | hsl(280, 61%, 50%) | |
| #8b0000 | hsl(0, 100%, 27%) | |
| #e9967a | hsl(15, 72%, 70%) | |
| #8fbc8f | hsl(120, 25%, 65%) | |
| #483d8b | hsl(248, 39%, 39%) | |
| #2f4f4f | hsl(180, 25%, 25%) | |
| #2f4f4f | hsl(180, 25%, 25%) | |
| #00ced1 | hsl(181, 100%, 41%) | |
| #9400d3 | hsl(282, 100%, 41%) | |
| #ff1493 | hsl(328, 100%, 54%) | |
| #00bfff | hsl(195, 100%, 50%) | |
| #696969 | hsl(0, 0%, 41%) | |
| #696969 | hsl(0, 0%, 41%) | |
| #1e90ff | hsl(210, 100%, 56%) | |
| #b22222 | hsl(0, 68%, 42%) | |
| #fffaf0 | hsl(40, 100%, 97%) | |
| #228b22 | hsl(120, 61%, 34%) | |
| #ff00ff | hsl(300, 100%, 50%) | |
| #dcdcdc | hsl(0, 0%, 86%) | |
| #f8f8ff | hsl(240, 100%, 99%) | |
| #ffd700 | hsl(51, 100%, 50%) | |
| #daa520 | hsl(43, 74%, 49%) | |
| #808080 | hsl(0, 0%, 50%) | |
| #008000 | hsl(120, 100%, 25%) | |
| #adff2f | hsl(84, 100%, 59%) | |
| #808080 | hsl(0, 0%, 50%) | |
| #f0fff0 | hsl(120, 100%, 97%) | |
| #ff69b4 | hsl(330, 100%, 71%) | |
| #cd5c5c | hsl(0, 53%, 58%) | |
| #4b0082 | hsl(275, 100%, 25%) | |
| #fffff0 | hsl(60, 100%, 97%) | |
| #f0e68c | hsl(54, 77%, 75%) | |
| #e6e6fa | hsl(240, 67%, 94%) | |
| #fff0f5 | hsl(340, 100%, 97%) | |
| #7cfc00 | hsl(90, 100%, 49%) | |
| #fffacd | hsl(54, 100%, 90%) | |
| #add8e6 | hsl(195, 53%, 79%) | |
| #f08080 | hsl(0, 79%, 72%) | |
| #e0ffff | hsl(180, 100%, 94%) | |
| #fafad2 | hsl(60, 80%, 90%) | |
| #d3d3d3 | hsl(0, 0%, 83%) | |
| #90ee90 | hsl(120, 73%, 75%) | |
| #d3d3d3 | hsl(0, 0%, 83%) | |
| #ffb6c1 | hsl(351, 100%, 86%) | |
| #ffa07a | hsl(17, 100%, 74%) | |
| #20b2aa | hsl(177, 70%, 41%) | |
| #87cefa | hsl(203, 92%, 75%) | |
| #778899 | hsl(210, 14%, 53%) | |
| #778899 | hsl(210, 14%, 53%) | |
| #b0c4de | hsl(214, 41%, 78%) | |
| #ffffe0 | hsl(60, 100%, 94%) | |
| #00ff00 | hsl(120, 100%, 50%) | |
| #32cd32 | hsl(120, 61%, 50%) | |
| #faf0e6 | hsl(30, 67%, 94%) | |
| #ff00ff | hsl(300, 100%, 50%) | |
| #800000 | hsl(0, 100%, 25%) | |
| #66cdaa | hsl(160, 51%, 60%) | |
| #0000cd | hsl(240, 100%, 40%) | |
| #ba55d3 | hsl(288, 59%, 58%) | |
| #9370db | hsl(260, 60%, 65%) | |
| #3cb371 | hsl(147, 50%, 47%) | |
| #7b68ee | hsl(249, 80%, 67%) | |
| #00fa9a | hsl(157, 100%, 49%) | |
| #48d1cc | hsl(178, 60%, 55%) | |
| #c71585 | hsl(322, 81%, 43%) | |
| #191970 | hsl(240, 64%, 27%) | |
| #f5fffa | hsl(150, 100%, 98%) | |
| #ffe4e1 | hsl(6, 100%, 94%) | |
| #ffe4b5 | hsl(38, 100%, 85%) | |
| #ffdead | hsl(36, 100%, 84%) | |
| #000080 | hsl(240, 100%, 25%) | |
| #fdf5e6 | hsl(39, 85%, 95%) | |
| #808000 | hsl(60, 100%, 25%) | |
| #6b8e23 | hsl(80, 60%, 35%) | |
| #ffa500 | hsl(39, 100%, 50%) | |
| #ff4500 | hsl(16, 100%, 50%) | |
| #da70d6 | hsl(302, 59%, 65%) | |
| #eee8aa | hsl(55, 67%, 80%) | |
| #98fb98 | hsl(120, 93%, 79%) | |
| #afeeee | hsl(180, 65%, 81%) | |
| #db7093 | hsl(340, 60%, 65%) | |
| #ffefd5 | hsl(37, 100%, 92%) | |
| #ffdab9 | hsl(28, 100%, 86%) | |
| #cd853f | hsl(30, 59%, 53%) | |
| #ffc0cb | hsl(350, 100%, 88%) | |
| #dda0dd | hsl(300, 47%, 75%) | |
| #b0e0e6 | hsl(187, 52%, 80%) | |
| #800080 | hsl(300, 100%, 25%) | |
| #663399 | hsl(270, 50%, 40%) | |
| #ff0000 | hsl(0, 100%, 50%) | |
| #bc8f8f | hsl(0, 25%, 65%) | |
| #4169e1 | hsl(225, 73%, 57%) | |
| #8b4513 | hsl(25, 76%, 31%) | |
| #fa8072 | hsl(6, 93%, 71%) | |
| #f4a460 | hsl(28, 87%, 67%) | |
| #2e8b57 | hsl(146, 50%, 36%) | |
| #fff5ee | hsl(25, 100%, 97%) | |
| #a0522d | hsl(19, 56%, 40%) | |
| #c0c0c0 | hsl(0, 0%, 75%) | |
| #87ceeb | hsl(197, 71%, 73%) | |
| #6a5acd | hsl(248, 53%, 58%) | |
| #708090 | hsl(210, 13%, 50%) | |
| #708090 | hsl(210, 13%, 50%) | |
| #fffafa | hsl(0, 100%, 99%) | |
| #00ff7f | hsl(150, 100%, 50%) | |
| #4682b4 | hsl(207, 44%, 49%) | |
| #d2b48c | hsl(34, 44%, 69%) | |
| #008080 | hsl(180, 100%, 25%) | |
| #d8bfd8 | hsl(300, 24%, 80%) | |
| #ff6347 | hsl(9, 100%, 64%) | |
| #40e0d0 | hsl(174, 72%, 56%) | |
| #ee82ee | hsl(300, 76%, 72%) | |
| #f5deb3 | hsl(39, 77%, 83%) | |
| #ffffff | hsl(0, 0%, 100%) | |
| #f5f5f5 | hsl(0, 0%, 96%) | |
| #ffff00 | hsl(60, 100%, 50%) | |
| #9acd32 | hsl(80, 61%, 50%) |
Related tools
Embed this tool on your site
Browse all embeddable tools →Free for blogs, HR, payroll and contractor sites: copy one snippet — the widget sizes itself and matches your colors.
Get the embed code
Frequently asked questions
Is it free and private?
Yes. It's free with no sign-up, and it runs entirely in your browser — the colors you enter are never uploaded or logged.
Why do I get a slightly different hex back from rounded HSL?
HSL rounded to whole numbers can't represent every one of the 16.7 million hex colors exactly, so a round trip may shift a channel by 1. Use decimals (hsl(9.13, 100%, 63.92%)) for an exact match.
What hue does gray have?
None — when saturation is 0 the hue is undefined and conventionally written as 0. Any hue with 0% saturation gives the same gray.
Is the modern syntax hsl(9 100% 64%) supported?
Yes. CSS Color 4 allows space-separated values and a slash for alpha (hsl(9 100% 64% / 50%)), supported by all current browsers. This tool reads both forms.
Your business here? Sponsor this tool from $16/week. See placements