Skip to main content
ToolCube – All tools at one place.

RGB to HSL Converter

Turn red, green and blue values into hue, saturation and lightness, the easiest format for adjusting a color by eye.

  • RGB to HSL preselected
  • Every format with Copy
  • Contrast checker

Convert a color

Detected: RGB

RGB
HSL

All formats

  • HSLhsl(24, 100%, 50%)
  • HEX#ff6600
  • RGBrgb(255, 102, 0)
  • HSV / HSBhsv(24, 100%, 100%)
  • CMYKcmyk(0%, 60%, 100%, 0%)
  • Nameclosest: orangered
  • CSScolor: #ff6600;

CMYK values are an approximation for screen colors; printed colors depend on the printer profile.

Pick a color from an image

Upload a photo or screenshot (JPG, PNG, WebP, AVIF or iPhone HEIC), then click or tap any point to pick its color. The image stays on your device.

Want to recolor part of an image? Try Change Image Color.

Shades, tints and harmonies

Shades (darker)

  • #e85d00
  • #d15300
  • #b94a00
  • #a24100
  • #8b3800
  • #742e00
  • #5d2500
  • #461c00
  • #2e1300
  • #170900

Tints (lighter)

  • #ff7417
  • #ff822e
  • #ff9046
  • #ff9e5d
  • #ffac74
  • #ffb98b
  • #ffc7a2
  • #ffd5b9
  • #ffe3d1
  • #fff1e8

Harmonies

Complementary – Opposite on the color wheel (180°).

Analogous – Neighbours 30° either side.

Triadic – Three colors 120° apart.

Split-complementary – The two colors next to the complement (150° and 210°).

Tetradic (square) – Four colors 90° apart.

Contrast checker (WCAG)

  • Your color on white

    2.93:1

    Sample of your color as text on #ffffff: contrast 2.93:1.

    • AA normal: Fail
    • AA large: Fail
    • AAA normal: Fail
    • AAA large: Fail
  • Your color on black

    7.15:1

    Sample of your color as text on #000000: contrast 7.15:1.

    • AA normal: Pass
    • AA large: Pass
    • AAA normal: Pass
    • AAA large: Pass
  • Your color on #1e3a8a

    3.52:1

    Sample of your color as text on #1e3a8a: contrast 3.52:1.

    • AA normal: Fail
    • AA large: Pass
    • AAA normal: Fail
    • AAA large: Fail

Guide

How to convert RGB to HSL

  1. Divide R, G and B by 255. Find the largest (max) and smallest (min).
  2. Lightness L = (max + min) ÷ 2.
  3. If max equals min the color is grey (H = 0, S = 0). Otherwise S = (max − min) ÷ (1 − |2L − 1|).
  4. Hue: if red is largest, H = 60 × ((G − B) ÷ (max − min) mod 6); if green, H = 60 × ((B − R) ÷ (max − min) + 2); if blue, H = 60 × ((R − G) ÷ (max − min) + 4).

When RGB to HSL helps

Image editors, screen color pickers and code often give colors as RGB. HSL is better for making changes you can predict: lowering saturation makes a color more muted, raising lightness makes it paler, and rotating the hue moves around the color wheel while keeping the same intensity.

This converter uses HSL for the harmony palettes too. A complementary color is the same saturation and lightness with the hue moved by 180 degrees, which is why converting to HSL is the first step in building color schemes.

HSL and HSV are not the same

HSL and HSV (also called HSB) both use a hue angle, but they measure the other two values differently. In HSL, 50% lightness gives the purest color; in HSV, 100% value does. Pure orange is hsl(24, 100%, 50%) but hsv(24, 100%, 100%). Photoshop and many color pickers use HSB, while CSS uses HSL, so make sure you copy the right one.

Reading the HSL result

The hue tells you the color family: around 0° is red, 30° orange, 60° yellow, 120° green, 180° cyan, 240° blue and 300° magenta. Saturation near 0% means the color is almost grey, and near 100% that it is vivid. Lightness near 0% is close to black and near 100% close to white, with the purest colors around 50%.

So rgb(255, 102, 0), which is hsl(24, 100%, 50%), reads as a fully saturated orange of medium lightness, the strongest version of that hue.

RGB to HSL chart of common colors

RGB to HSL values for common colors
ColorRGBHSL
Blackrgb(0, 0, 0)hsl(0, 0%, 0%)
Whitergb(255, 255, 255)hsl(0, 0%, 100%)
Redrgb(255, 0, 0)hsl(0, 100%, 50%)
Limergb(0, 255, 0)hsl(120, 100%, 50%)
Bluergb(0, 0, 255)hsl(240, 100%, 50%)
Yellowrgb(255, 255, 0)hsl(60, 100%, 50%)
Cyanrgb(0, 255, 255)hsl(180, 100%, 50%)
Magentargb(255, 0, 255)hsl(300, 100%, 50%)
Silverrgb(192, 192, 192)hsl(0, 0%, 75.3%)
Grayrgb(128, 128, 128)hsl(0, 0%, 50.2%)
Maroonrgb(128, 0, 0)hsl(0, 100%, 25.1%)
Olivergb(128, 128, 0)hsl(60, 100%, 25.1%)
Greenrgb(0, 128, 0)hsl(120, 100%, 25.1%)
Purplergb(128, 0, 128)hsl(300, 100%, 25.1%)
Tealrgb(0, 128, 128)hsl(180, 100%, 25.1%)
Navyrgb(0, 0, 128)hsl(240, 100%, 25.1%)
Orangergb(255, 165, 0)hsl(38.8, 100%, 50%)
Tomatorgb(255, 99, 71)hsl(9.1, 100%, 63.9%)

Other colors: use the converter above or the Color Converter.

FAQ

Frequently Asked Questions

Answers to common questions about RGB to HSL on ToolCube.

What is rgb(128, 128, 128) in HSL?

It is hsl(0, 0%, 50.2%), a middle grey with no hue or saturation.

Why does HSL show a decimal?

One decimal place keeps enough precision to convert back to exactly the same RGB values.

Is HSB the same as HSL?

No. HSB (or HSV) measures brightness differently. The converter shows both, labelled separately.