Skip to main content
WebColorTools

HSL to HEX Converter

Convert HSL color values to HEX codes instantly. Free, in your browser.

Instant 100% Private Free Forever
HSL HEX CSS Converters
HSL values
#FF5733

HEX output

#FF5733
RGB rgb(255, 87, 51)

Examples

How to use the HSL to HEX Converter

Four steps to turn HSL into a HEX color code.

  1. 1

    Enter HSL values

    Type hue (0–360), saturation (0–100%), and lightness (0–100%), or pick a color with the swatch.

  2. 2

    Check the live preview

    The large swatch updates as you edit so you can verify the color before copying.

  3. 3

    Copy the HEX code

    Click Copy next to the main #HEX output, or grab the bonus RGB value for API or canvas work.

  4. 4

    Try an example

    Use Load example or the gallery chips for hsl(11, 100%, 60%), a vivid blue, and black.

What is HSL to HEX conversion?

HSL to HEX conversion turns cylindrical color coordinates — hue, saturation, and lightness — into the compact hexadecimal strings that dominate web design, mobile UI kits, and brand style guides. You might tune a palette in HSL because it is intuitive: raise lightness for a tint, drop saturation for a neutral, keep hue fixed for brand consistency. When the next step requires a HEX code like #FF5733 for CSS, a Figma swatch, or a JSON design token, this free converter closes that gap instantly with a live preview and one-click copy.

HSL (Hue, Saturation, Lightness) maps color the way artists think about it. Hue is an angle on the wheel from 0° to 360°. Saturation (0–100%) controls how gray or vivid the color is. Lightness (0–100%) moves between black and white through your chosen hue. CSS accepts the syntax hsl(11, 100%, 60%) — the same numbers you enter here. Search phrases like hsl to hex, hsl to hex converter, and convert hsl to hex describe this everyday handoff from adjustable HSL thinking to portable HEX notation.

A HEX color code stores red, green, and blue as base-16 pairs: #RRGGBB. Six digits cover 16.7 million colors. HEX is shorter than functional RGB notation, easy to grep in codebases, and universally recognized by design tools. It does not expose hue or lightness directly — which is exactly why you convert from HSL when you have been working in cylindrical space but need a hex literal for delivery.

The conversion pipeline is straightforward and matches browser math. HSL values first become RGB integers (each channel 0–255) using standard HSL-to-RGB formulas. Those three channels are then encoded as hexadecimal pairs and prefixed with #. For example, HSL (11°, 100%, 60%) yields RGB (255, 87, 51) and HEX #FF5733. The process is reversible within normal rounding, so you can round-trip through our HEX to HSL tool to verify.

Practical scenarios include: exporting theme tokens after tweaking HSL variables in a design system; translating CSS hsl() custom properties into HEX for a React Native stylesheet; preparing colors for SVG fill attributes that expect hex; matching documentation that lists brand colors as # values after exploring variants in HSL; and teaching students how the same color wears two different notations.

This tool runs entirely in your browser — no account, no upload, no tracking. Enter HSL manually, drag the native picker, load a random example, or tap a gallery chip. Copy the uppercase HEX result or the bonus RGB line for canvas APIs and spreadsheets. For other directions across the converter set, see our HSL to RGB, RGB to HSL, and Color Converter tools.

Frequently asked questions

Why convert HSL to HEX instead of using hsl() in CSS?
Modern CSS supports hsl() natively, but many workflows still require HEX: Figma token exports, legacy Sass variables, Android XML colors, email HTML, and design-system JSON files often store #RRGGBB strings. If you adjusted a color in HSL — say, nudging lightness for a hover state — this converter gives you the exact hex code to paste back into those tools.
How are hue, saturation, and lightness interpreted?
Hue is an angle from 0° to 360° on the color wheel (red ≈ 0°, green ≈ 120°, blue ≈ 240°). Saturation is 0–100% vividness (0% = gray). Lightness is 0–100% brightness (0% = black, 100% = white). These match the CSS HSL model used by this tool and by browsers when you write hsl(H, S%, L%).
Will the HEX output match what my browser shows for the same HSL?
Yes, within normal rounding. The conversion path is HSL → RGB → HEX using the same formulas as CSS. Very small differences (±1 on an RGB channel) can appear because HSL percentages are integers in the UI, but the swatch preview uses the computed RGB so you can visually confirm the result before copying.
Can I use the color picker instead of typing HSL numbers?
Absolutely. The native picker sets RGB under the hood and syncs the H, S, and L fields automatically. This is handy when you know the color visually but not its cylindrical coordinates — pick it, then read or tweak the HSL values before copying the HEX output.
Is my color data sent anywhere?
No. Every calculation runs locally in your browser. Nothing is uploaded, logged, or stored on a server. You can use the tool offline once the page has loaded.