Color Converter
Type HEX, RGB or HSL and get the other two formats instantly. The swatch shows the colour, and everything stays in your tab.
| Format | Value |
|---|---|
| HEX | |
| HEX (short) | |
| RGB | |
| RGBA (alpha 1) | |
| HSL | |
| Luminance (WCAG) | |
| Contrast vs white / black |
Notes
- Accepted input:
#rgb,#rrggbb,rgb(r, g, b),rgba(r, g, b, a)andhsl(h, s%, l%). Alpha is kept when present. - Luminance and contrast use the WCAG relative luminance formula; 4.5:1 is the usual AA threshold for body text.
- The short HEX form only exists when every channel is a doubled byte, for example
#ffcc00, not#3b82f6.