RGB to HSL Color Converter

Convert RGB to HSL instantly — free, in your browser.

Processed locally — files never leave your device

Type the red, green and blue values (0–255 each), or use the color picker. The result updates as you type.

Works offline once loaded Uploaded: 0 bytes

HSL describes a color by its hue (an angle on the color wheel), its saturation (how vivid it is) and its lightness (how close to white or black). This free converter gives you the exact RGB to HSL values instantly, with a live swatch so you can see the color as you type — no tables to look up, no guessing.

It runs entirely in your browser, so nothing is uploaded and it works offline once the page loads. Designers use it to translate brand colors between tools: copy a HEX from a style guide, get the RGB for CSS, the HSL for a color picker, or the CMYK for print. For image work, pair it with the Image Compressor or the Background Remover.

How to use

  1. Type or paste your RGB color value into the box above — or pick a color with the color picker.
  2. The result updates live, with a swatch showing the exact color.
  3. Check the breakdown: every channel is shown separately.
  4. Press Copy to copy the converted value for your CSS, design tool or print file.

Why use Toolsvine

HSL is the color model designers actually think in, and RGB is the model screens store — this tool translates between the two. Getting HSL from RGB by hand means dividing by 255, finding maxima and doing fractions, and one slip turns a fresh tomato red into a muddy rust. A converter that runs locally, shows the swatch live and copies the answer in one click turns a chore into a second — free, with no account and no upload.

How does the RGB to HSL conversion work?

First divide each channel by 255 so R, G and B run from 0 to 1, then find the largest (max) and smallest (min) channel. Lightness is L = (max + min) / 2. Hue comes from which channel is largest: red near 0°, green near 120°, blue near 240°. Saturation measures how far the color is from gray.

If max equals min the color is gray and saturation is 0, and the hue is undefined — a gray has no family on the color wheel. Otherwise saturation is S = (max − min) / (1 − |2L − 1|), and hue comes from which channel is largest.

Worked example: tomato rgb(255, 99, 71)

Tomato rgb(255, 99, 71) is hsl(9, 100%, 64%). The channels are R = 1.0, G = 0.39 and B = 0.28, so max is 1.0 and min is 0.28: lightness is (1.0 + 0.28) / 2 = 0.64, saturation is full, and the hue of 9° sits just past red toward orange — exactly where a ripe tomato belongs.

RGB to HSL worked example showing tomato rgb 255 99 71 converted to hsl 9 100 percent 64 percent
rgb(255, 99, 71) converts to hsl(9, 100%, 64%) — hue 9°.

Common colors

ColorValue
rgb(255, 0, 0)hsl(0, 100%, 50%)
rgb(0, 255, 0)hsl(120, 100%, 50%)
rgb(0, 0, 255)hsl(240, 100%, 50%)
rgb(128, 128, 128)hsl(0, 0%, 50%)
rgb(255, 165, 0)hsl(39, 100%, 50%)

Values are rounded for display: RGB channels are whole numbers from 0 to 255, HSL and HSV use degrees and percentages, and OKLCH lightness runs from 0 to 1. The converter itself keeps full precision and only rounds what it shows you.

Why convert RGB to HSL for a design system?

HSL makes palettes: keep the hue and saturation, then step the lightness up for tints and down for shades. A tomato red at hsl(9, 100%, 64%) becomes a soft tint at 85% lightness and a deep shade at 30%, all the same family.

In RGB that same palette means recalculating three channels per step, and the hue drifts if you are not careful. CSS accepts hsl() directly, so you can paste the result into a stylesheet as-is. For the screen-model version of the same color, the RGB to HEX Color Converter gives you the six-digit code.

Frequently asked questions

How do I convert RGB to HSL?

Type the value in the box above — the result appears instantly, with a swatch showing the exact color. Press Copy to use it in your CSS or design file. The converter accepts rgb(255, 99, 71) or plain 255, 99, 71, and it divides each channel by 255 before doing the math.

Is my color data uploaded anywhere?

No. The conversion runs in your browser with JavaScript. Nothing leaves your device, and the page works offline after it loads. Your brand colors and client palettes never leave your computer, which is the whole point of a local converter.

Why do the same colors have different values in different tools?

Every color model describes the same color differently: HEX and RGB store red, green and blue amounts; HSL stores hue, saturation and lightness; CMYK stores ink. They are translations, not different colors. The swatch never changes — only the numbers that describe it do.

What is the difference between HSL and HSV?

Both describe a color by hue plus two more numbers, but lightness (HSL) and value (HSV) are not the same: HSL lightness 50% is the most saturated color, while HSV value 100% is the brightest. The same color has different S and L/V numbers in each model, which is why a color picker and a CSS file can disagree on paper but still show the same color.

Can I use the result in CSS?

Yes — copy the value straight into your stylesheet. Modern browsers accept rgb(), hsl() and oklch() directly, and HEX works everywhere. HSL is especially handy in CSS because you can build a whole palette by stepping the lightness up and down while the hue stays put.