Skip to content

RGB to HSL

Turn RGB values into hue, saturation and lightness.

How to use the rGB to HSL

Three steps, all in your browser.

  1. 1

    Enter a color

    Type or paste a code in any format, or use the picker.

  2. 2

    See every format

    The converted values update as you type, in every format at once.

  3. 3

    Copy the codes

    Copy any color code in one click, or share the page link.

RGB to HSL: what to know

RGB to HSL converts red, green and blue values into hue, saturation and lightness. The tool scales each channel to between 0 and 1, takes lightness as the average of the largest and smallest channel, works out saturation from their difference and finds hue from which channel is strongest.

Seeing a color as HSL makes its character obvious: the hue tells you which color family it belongs to, saturation tells you whether it's vivid or gray, and lightness tells you how close it is to black or white. That's useful for organizing colors, building themes and explaining color choices.

Equal red, green and blue values are grays, which have 0% saturation; their hue is shown as 0 by convention.

Popular uses

  • Turning RGB from code or a sensor into editable HSL
  • Sorting a set of colors by hue
  • Making lighter and darker variants of an RGB color
  • Understanding the vividness and lightness of a color

Tips for the best result

  • Paste rgb() straight from CSS; commas or spaces both work.
  • Compare saturation values to check whether a set of colors feels consistent.
  • For perceptually even lightness, look at the OKLCH value in the color converter too.

Read how JustYourPalette works, browse named colors and curated palettes, and see our privacy details. Colors you enter and images you open are processed in your browser and are never sent to our server.

Frequently asked questions

Scale R, G and B to 0-1. Lightness is the average of the largest and smallest value; saturation depends on their difference; hue is the angle set by which channel is largest and how the other two compare.

Grays have equal red, green and blue, so saturation is 0% and hue is undefined. By convention it's shown as 0, and changing it has no effect until saturation goes above 0%.

No. Every tool runs in your browser, so the colors you enter and any image you open are processed on your device and are not sent to our server or stored. Reloading or closing the page clears them.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

Yes. Colors and color codes aren't owned by anyone, so you can use anything you make here in personal and commercial projects. Brand colors may still be protected as part of a trademark.