HSL to Hex/RGB Converter

%
%
%
Hex
#3C83F6
RGB
rgb(60, 131, 246)
HSL
hsl(217, 91%, 60%)

How to Use the HSL to Hex/RGB Converter

HSL (Hue, Saturation, Lightness) models color the way artists and designers naturally describe it. Hue is the position on the color wheel measured in degrees — 0° is red, 120° is green, 240° is blue. Saturation controls vividness from 0% (gray) to 100% (fully vivid). Lightness runs from 0% (black) through 50% (normal) to 100% (white). CSS supports hsl() and hsla() functions natively, making HSL popular for programmatic color manipulation.

Enter HSL values and the converter computes the equivalent RGB channels through a multi-step transformation: hue angle maps to RGB proportions, saturation scales distance from gray, and lightness shifts overall brightness. The resulting RGB values then encode to Hex for web use. All three formats display simultaneously so you can copy whichever your workflow requires.

HSL excels at creating color variations. Increase lightness by 10% to get a lighter tint without changing the hue angle — ideal for hover states. Decrease lightness for darker shades while keeping the same saturation. This predictability makes HSL preferable to RGB when building systematic palettes programmatically.

HSLA adds alpha transparency on a 0–1 scale, matching CSS rgba() behavior. Designers migrating from HSL-based tools like Sass color functions or Figma HSL panels use this converter to produce Hex codes for environments that only accept # notation.

Whether you are translating HSL theme variables into Hex design tokens, exploring hue rotations for a color scheme, or learning how the color wheel maps to screen pixels, HSL conversion connects human-friendly color description to machine-readable formats.

Common use cases

  • CSS hsl() migration

    Convert hsl() theme variables to Hex for tools, email clients, or platforms that lack HSL support.

  • Programmatic palettes

    Generate Hex swatches from HSL formulas that rotate hue angles by fixed degree increments.

  • Design tool export

    Translate HSL values from Figma or Sketch color panels into Hex for developer handoff documents.

  • Accessibility tuning

    Adjust lightness percentage to meet contrast requirements while keeping hue and saturation stable.

  • Sass/Less workflows

    Verify computed HSL output from preprocessor color functions against expected Hex results.

Frequently asked questions

240° is pure blue in HSL. Red is 0°, green is 120°, and cyan is 180°.

HSL makes it easier to create lighter/darker variants by changing one value (lightness) without shifting hue.

CSS uses HSL (lightness). HSV (value) is common in design software but is not a native CSS color function.

Related color tools