On-device AI — professional-grade, fully private.

RGB to HSL Converter

RGB to HSL for easy theming — hue, saturation, lightness.

  • Runs on your device
  • Hue survives on greys
  • Also OKLCH, LAB and CMYK

Drop a stylesheet or token file

CSS, SCSS, SASS, LESS, JSON, SVG or TXT — up to 10.0 MB

#FF4D4D

Nearest colour name: tomato (Same family, distance 6.4)

RGBrgb(255 77 77)
HSLhsl(0 100% 65.1%)
  • HEX#FF4D4D
  • RGBrgb(255 77 77)
  • HSLhsl(0 100% 65.1%)
  • HWBhwb(0 30.2% 0%)
  • HSVhsv(0 69.8% 100%)Not CSS
  • CMYKcmyk(0% 69.8% 69.8% 0%)Not CSS
  • LABlab(59.906 67.771 41.299)
  • LCHlch(59.906 79.363 31.36)
  • OKLABoklab(0.673 0.19441 0.09082)
  • OKLCHoklch(0.673 0.21457 25.04)
  • Display P3color(display-p3 0.9239 0.3574 0.3319)
  • XYZ D65color(xyz-d65 0.45232 0.27107 0.09872)

Contrast

On white3.27:1
Aa
  • AA normalFail
  • AA largePass
  • AAA normalFail
  • AAA largeFail
On black6.42:1
Aa
  • AA normalPass
  • AA largePass
  • AAA normalFail
  • AAA largePass
On your colour3.27:1
  • AA normalFail
  • AA largePass
  • AAA normalFail
  • AAA largeFail

Nearest passing shade — #E22D35 clears 4.51:1 against your comparison colour.

Colour vision

How this colour appears to people with each kind of colour-vision deficiency.

  • Typical vision
  • Protanopia
  • Deuteranopia
  • Tritanopia
  • No colour vision
What are you converting?
Colour value

Any CSS colour syntax, plus cmyk() and hsv().

Edit channels in

Values you type here stay put, even when the colour has no hue to show them on.

Compare against
Export
Export as
Recent colours
Colours you convert appear here.

How to convert RGB to HSL

  1. Enter RGB values

    Set Red, Green, and Blue (0–255 each) using sliders or inputs.

  2. View HSL result

    Hue (0–360°), Saturation (0–100%), and Lightness (0–100%) update automatically.

  3. Copy or use

    Copy the HSL values for CSS, design tools, or further editing.

Why Convert RGB to HSL?

Converting RGB to HSL enables intuitive color manipulation, easier brightness and saturation adjustments, better color selection, and improved design workflow.

Benefits of HSL Format

  • Intuitive Selection: More intuitive color representation
  • Easy Adjustment: Simple to adjust brightness and saturation
  • Design Tools: Commonly used in design applications
  • Color Manipulation: Easier to create color variations
  • Visual Understanding: Better understanding of color relationships

RGB vs HSL: Understanding the Difference

Understanding the differences between RGB and HSL helps you choose the right format for your needs.

RGB Format Characteristics

  • Red, Green, Blue component values
  • Each component ranges from 0 to 255
  • More precise color control
  • Standard format for digital design
  • Compatible with all design tools

HSL Format Characteristics

  • Hue, Saturation, Lightness color model
  • Intuitive color representation
  • Easy to adjust brightness and saturation
  • Commonly used in design tools
  • More intuitive for color selection

Why HSL lightness is not what your eye sees

HSL is the easiest colour model to reason about and the least reliable one to build a palette from. The reason is worth knowing before you commit a theme to it.

  • 50% lightness is not one brightness — hsl(60 100% 50%) is a vivid yellow and hsl(240 100% 50%) is a dark blue. Same number, wildly different apparent brightness, so a ramp built on it is uneven.
  • Lightening drifts the hue — Raise the lightness of a blue in HSL and it wanders toward purple. OKLCH was designed to fix exactly this, and this page shows both so you can compare.
  • Grey has no hue at all — At 0% saturation the hue is undefined, not zero. This page keeps the hue you typed instead of snapping it back, so you can set a hue first and add saturation after.
  • Saturation behaves differently near the ends — As lightness approaches 0% or 100% every saturation converges on black or white, which is why small edits there appear to do nothing.

When to Convert RGB to HSL

Convert RGB to HSL when you need intuitive color manipulation, easier adjustments, or better color selection in design work.

Ideal Use Cases

  • Design Work: Use HSL for easier color manipulation
  • Color Variations: Create color variations more easily
  • Brightness Adjustment: Adjust brightness intuitively
  • Saturation Control: Control saturation more easily
  • Design Tools: Use HSL in design applications

RGB to HSL Conversion Facts

Understanding these facts helps you make informed conversion decisions.

Key Statistics

  • HSL uses hue (0-360), saturation (0-100%), and lightness (0-100%)
  • RGB uses red, green, and blue values (0-255 each)
  • Conversion maintains color accuracy
  • HSL is more intuitive for color selection
  • RGB is more precise for color manipulation

Best Practices

Follow these guidelines for optimal RGB to HSL conversion results.

Quality Considerations

  • Verify RGB values before conversion
  • Use valid RGB ranges (0-255 for each component)
  • Check HSL values for accuracy
  • Test colors in your target application
  • Consider color space and gamut limitations

When Not to Convert

  • Don't convert if RGB format works for your use case
  • Keep RGB for applications requiring RGB specifically
  • Avoid conversion if format compatibility isn't needed
  • Don't convert for applications that don't support HSL

Limitations and compatibility

Conversion runs on your device; requires JavaScript and a modern browser.

Powered by optimised image processing algorithms.

The other colour converters

Frequently asked questions

How does the RGB to HSL converter work?

Enter Red, Green, and Blue (0-255) with sliders or inputs, and the tool converts them to Hue (0-360 degrees), Saturation (0-100%), and Lightness (0-100%). A live preview updates instantly, and you can copy the HSL values for CSS or design tools.

What is HSL and why use it?

HSL describes color by Hue (the color itself on a 360-degree wheel), Saturation (how vivid it is), and Lightness (how bright). It maps to how people think about color, making it easier to adjust tone or build theme variations than editing raw RGB numbers.

Is RGB to HSL conversion lossless?

Yes. HSL and RGB describe the same color in different coordinates, so the conversion is reversible with no loss of information. Convert to HSL, tweak the values, and you can return to RGB or HEX without degrading the color.

What ranges do the HSL values use?

Hue runs from 0 to 360 degrees around the color wheel, while Saturation and Lightness are percentages from 0 to 100. The converter displays results in exactly these ranges, matching the hsl() syntax used in CSS.

How do I adjust colors using HSL?

Change Hue to shift to a different color, raise or lower Saturation to make it more vivid or muted, and adjust Lightness to lighten or darken. This makes HSL ideal for generating tints, shades, and consistent UI color scales.

Is the tool free, private, and available offline?

Yes. The converter is completely free, and every calculation runs locally on your device, so your colors are never uploaded. It works on mobile and desktop and keeps functioning after the page loads.

4.8out of 5

from 334 ratings

Rate this tool

Tap a star — it takes a second