Nothing uploaded
Convert RGB to HSL
Type an RGB color to get its hsl() value: the same color described by hue, saturation and lightness, so it’s easy to adjust in CSS.
HEX, rgb(), hsl(), hsv(), cmyk(), oklch() or a CSS name such as tomato.
Contrast
On white 4.99:1
- AA, normal text: Pass
- AA, large text: Pass
- AAA, normal text: Fail
- AAA, large text: Pass
On black 4.21:1
- AA, normal text: Fail
- AA, large text: Pass
- AAA, normal text: Fail
- AAA, large text: Fail
For text in this color on a white or black background (WCAG 2). Large text is 24 px, or 18.66 px bold.
Formats
Read as RGB.
- HSL
- hsl(348, 83.3%, 47.1%)
- HEX
- #dc143c
- RGB
- rgb(220, 20, 60)
- HSV (HSB)
- hsv(348, 90.9%, 86.3%)
- CMYK (approximate)
- cmyk(0%, 90.9%, 72.7%, 13.7%)
- OKLCH
- oklch(57.12% 0.2219 20.09)
- CSS name
- crimson
CMYK uses the simple formula, without a color profile. Printers convert with their own profile, so treat it as a starting point.
What you type stays on this device. Nothing is uploaded.
Did this save you time? DigiTools is free, with no ads and no sign-up. Leave a tip (opens in a new tab) to help keep it that way.
Tell others what you think: review DigiTools on Trustpilot (opens in a new tab).
How to convert RGB to HSL
- Type or paste an RGB color, such as rgb(220, 20, 60).
- Read the HSL value at the top, with every other format under it. It updates as you type.
- Copy what you need, and check how readable the color is on white and on black.
Questions
Is anything sent to a server?
No. Colors are converted in your browser on this device, as you type, and nothing is stored.
How do I convert RGB to HSL?
Divide each value by 255. Lightness is the average of the largest and the smallest; saturation is their difference divided by (1 − |2 × lightness − 1|). The hue depends on which channel is largest: in rgb(220, 20, 60) it’s red, and the hue comes out at 348°, just short of a full turn.
When is HSL better than RGB?
When you need variations of one color: keep the hue and change the lightness for hover and pressed states, or lower the saturation for muted backgrounds. In RGB all three numbers would change.