Colors & design
Color picker
Find your shade. Take its HEX, RGB or HSL code with you.
How it works
Color picker
Choose a color or enter a code. All three representations update together. HEX and RGB describe the same red, green and blue channels.
How to use this tool
- Choose a color in the swatch, or enter a HEX, RGB or HSL value and leave the field to apply it.
- Copy the representation you need for CSS. Check text readability with the related contrast tool before choosing a foreground color.
Understanding the result
HEX and RGB describe the same opaque sRGB color. HSL describes hue, saturation and lightness; changing notation does not change the intended color.
Worked examples
#ff0000 → rgb(255, 0, 0)
#000 → #000000
#fff → hsl(0, 0%, 100%)
Good to know
Opaque sRGB colors only. Screen appearance varies; these are not CMYK printing values.
HEX accepts three or six digits; RGB uses whole channels from 0 to 255. HSL-to-RGB conversion rounds to whole channels. Alpha transparency, CMYK and image sampling are outside this tool.
A few quick answers
Why can HSL values change slightly after conversion?
The displayed HSL values and RGB channels are rounded. A round trip through those representations can introduce a small difference.
Sources and implementation
Implementation for this tool: sRGB · HEX / RGB / HSL
Maintained by Chpl Limited · Updated: