How to use it
- Pick a color with the color picker or type a color code:
#7b2d9b,rgb(123, 45, 155)orhsl(283, 55%, 39%). - Its HEX, RGB and HSL values appear right away; press "Copy" to take the one you need.
- Use the sliders to fine-tune and check the contrast ratios on the right.
Frequently asked questions
What is the difference between HEX, RGB and HSL?
All three describe the same color in different ways. HEX writes the red, green and blue values as hexadecimal numbers and is the most common format in CSS. RGB writes the same values as numbers from 0 to 255. HSL describes the color as hue, saturation and lightness, which makes lighter or darker shades easy to find.
Is transparency (alpha) supported?
Yes. 8-digit HEX (#ff000080), rgba() and hsla() codes are read and converted with their transparency kept.
Why does the contrast ratio matter?
When text and background have low contrast, the text is hard to read. The WCAG 2 accessibility guidelines recommend at least 4.5:1 for body text and 3:1 for large text. The tool works out the ratio of your color on white and on black.