HSL to Hex Converter
Convert HSL color values to hexadecimal codes. Enter hue, saturation, and lightness for instant hex output.
HSL to Hex Converter tool
Example
Input: Hue 120, Saturation 100%, Lightness 25%
Result: HEX: #008000, RGB: rgb(0, 128, 0)
Hue 120 is pure green, full saturation removes red and blue, and 25% lightness puts green at half intensity (128 = 80 in hex). This is the CSS named color green.
Hue Angles and Their Hex Codes
| Hue | Hex | Color |
|---|---|---|
| 0 | #FF0000 | Red |
| 30 | #FF8000 | Orange |
| 60 | #FFFF00 | Yellow |
| 90 | #80FF00 | Yellow-green |
| 120 | #00FF00 | Green |
| 150 | #00FF80 | Spring green |
| 180 | #00FFFF | Cyan |
| 210 | #0080FF | Azure |
| 240 | #0000FF | Blue |
| 270 | #8000FF | Violet |
| 300 | #FF00FF | Magenta |
| 330 | #FF0080 | Rose |
Saturation 100% and lightness 50%, computed with the converter.
- Set the hue value by entering a number between 0 and 360 degrees or dragging the rainbow hue slider.
- Adjust the saturation percentage from 0% (gray) to 100% (full color) using the input field or slider.
- Set the lightness percentage from 0% (black) through 50% (pure color) to 100% (white).
- View the resulting hex color code and live color preview updating in real time as you adjust each value.
- Click the copy button to copy the hex code for direct use in your CSS, brand style guide, or design tool.
Turning HSL Values into Hex Codes
This converter turns hue, saturation and lightness into a hex code you can paste anywhere. For example, hsl(120, 100%, 25%) is #008000, the CSS color green. You also get the rgb() value and a live preview of the color. HSL is a comfortable way to design a color. You pick a hue, then set how vivid and how light it is. Many brand guides, design apps and older codebases still expect hex, though. The math goes from HSL to RGB first, then writes each RGB channel as two hex digits.
A few landmarks help you aim. Red sits at 0 degrees, yellow at 60, green at 120, cyan at 180, blue at 240 and magenta at 300. Saturation 0% gives a gray whatever the hue. Lightness 50% gives the purest version of a hue, while 0% is always black and 100% is always white.
Set the numbers with the inputs or the three gradient sliders. Hue takes 0 to 360 and the percentages take 0 to 100, in whole numbers. If you need lighter and darker steps of the result, the Color Shade and Tint Generator builds a full scale from it.
Formula / How It Works
Sources
Frequently Asked Questions
Related Tools
Hex to RGB Converter
Convert hexadecimal color codes to RGB values instantly. Supports shorthand and 8-digit hex with alpha.
Color ToolsRGB to HSL Converter
Convert RGB color values to HSL format. See hue, saturation, and lightness with a live color preview.
Color ToolsColor Picker
Pick any color visually and get values in hex, RGB, HSL, and CMYK. Interactive saturation panel and hue slider.
Color Tools