Emitting a design-token colour
Choose the colour in HSL, then convert to hex for the token file or stylesheet that consumes it.
Converts hsl colour to hex in this tab, with nothing sent anywhere.
Find related browser-local tools for nearby tasks without starting another search.
Browse all general convertersHex is the compact, universal way to write a colour for the web - six digits that every design tool, stylesheet and component library accepts - while HSL is the comfortable way to choose one. Converting HSL to hex closes that loop: you adjust a colour intuitively as a hue, saturation and lightness, then emit the tidy hex code that everything downstream expects. The conversion goes through RGB internally, because hex is simply RGB written in base sixteen, but you never see that intermediate step. This reads the three HSL components, works out the channel values, and assembles the six-digit hex code with its leading hash, ready to paste into CSS, a design file, or anywhere a colour is expected.
Choose the colour in HSL, then convert to hex for the token file or stylesheet that consumes it.
Generate shades by varying HSL lightness, then convert each to hex for delivery.
At zero saturation, changing hue does not change the grey result; lightness determines how bright it is. At zero lightness the result is black regardless of hue. Use a middle lightness and nonzero saturation when checking whether a hue change is working. The converted hex value does not include an alpha channel.
Hex is just RGB in base sixteen, so the conversion computes the channels first. You only see the final hex.
Yes. The output is a standard six-digit hex code with its leading hash.
No. It produces the opaque six-digit form.
Only by up to one channel value, which is imperceptible.
Convert an HSL colour to RGB in your browser.
Convert an RGB colour to a hex code in your browser, from any common RGB format.
Convert a hex colour to CMYK in your browser, to take a web colour toward print.