RGB to HSL Converter

Convert RGB channels to hue, saturation and lightness.

Runs in your browser Color & CSS Free · No account

Input

Processed locally

This tool runs entirely in your browser. The data you paste or load is never uploaded.

Result

Enter your input, then run the tool.

About this tool

Converts RGB to HSL, which is far easier to reason about when building a palette: shift the hue to change colour, adjust lightness for states. The output includes a CSS hsl() declaration and a preview swatch.

How to use it

  1. Enter the RGB values or pick a colour.
  2. Read the hue, saturation and lightness.
  3. Copy the hsl() value.

Frequently asked questions

Why is saturation sometimes 0%?
Greys have no hue information, so saturation is zero by definition.
Is HSL better than RGB?
For authoring variants of one colour, usually yes. For perceptual uniformity, neither is ideal; oklch is worth considering in modern CSS.

Keep going

More in this category