Designed a colour in HSL because it was easy to adjust, but the stylesheet, brand sheet or design tool wants hex? This free hsl to hex converter turns hsl(210, 100%, 50%) into #0080FF — the same vivid blue, in the notation most tools expect. Everything runs in your browser, so nothing is uploaded and no signup is needed.

How to use this hsl to hex converter

Three quick steps — enter, check, copy.

1Enter hue, saturation and lightness

Type the hue in degrees (0–360) and saturation and lightness as percentages (0–100).

2Check the swatch

Confirm the preview is the colour you designed; a hue typed 10° off is a visibly different colour.

3Copy the hex code

Paste the resulting 6-digit code into your CSS, design token file or brand document.

Why convert with this hsl to hex converter before you ship

Built to be free, private, and exact — right in your browser.

Hex is the storage format

Design tools, brand guidelines and most stylesheets store colours as hex, even when HSL was the easier way to design them.

Rounding kept honest

HSL percentages are rounded for display, so the tool converts from the values you entered and shows the nearest exact hex.

Grey and white handled cleanly

At 0% saturation the hue stops mattering and the result is a pure grey; at 100% lightness the result is white, whatever hue you typed.

Same colour, both notations

HSL and hex describe the same sRGB colour, so the conversion changes how the colour is written, not the colour itself.

HSL to HEX Converter FAQs

Short, direct answers to the questions readers ask most.

Convert the HSL values to RGB first — scaling hue, saturation and lightness into red, green and blue channels — then write each channel as two hex digits.

The tool rejects it. Saturation and lightness are percentages, so only 0–100 are valid.

Yes. The wheel wraps around, so 360° is red again, exactly like 0°.

At 0% saturation there is no colour information left, so the hue has nothing to affect and every hue gives the same grey.

Within the limits of 8-bit colour it is. HSL values are continuous, but hex stores whole numbers per channel, so the tool returns the nearest one.