Color picker
Pick a color, or type one as hex, rgb(), hsl(), oklch() or a name. Every format appears at once. The gray values are an example.
Example: a dark green.
- HEX
#0b6b47- RGB
rgb(11, 107, 71)- HSL
hsl(157.5, 81.4%, 23.1%)- OKLCH
oklch(46.8% 0.101 160.8)
Good to know
- What it reads
- Hex with 3, 4, 6 or 8 digits (the
#is optional),rgb()andrgba()with commas or spaces,hsl()with degrees or turns,oklch(), the 148 CSS color names,transparent, or three numbers such as11 107 71. - Which format
- HEX and RGB work everywhere. HSL is handy for making a color lighter or darker by hand. OKLCH, in all current browsers, has a lightness that matches how light a color looks, so shades made from it keep even contrast.
- Exact
- Each format is rounded only as far as it still converts back to the same color, with room to spare. That is why HSL sometimes shows a decimal:
hsl(217, 91%, 60%)is not quite#3b82f6. Chrome computes OKLCH slightly differently from the CSS specification, so in Chrome about 1 color in 200 (bright greens and cyans with little red) shows its red one step (of 255) off from the OKLCH code. - Transparency
- An alpha (8-digit hex, or the fourth value of
rgba()) is kept in every format and shown over a checkerboard. The system picker cannot set it. - Contrast
- The WCAG 2 ratio of white and of black text on the color. Body text needs 4.5:1 (AA) or 7:1 (AAA); large text and icons need 3:1. Ratios are cut, not rounded, so 4.499 shows as 4.49:1. A transparent color has no ratio of its own: it depends on what is behind it.
- Pick from screen
- Takes a color from anywhere on your screen, in Chrome and Edge on a computer. Other browsers show the color picker only.
- Open from a link
?color=%230b6b47,?color=tealor?color=rgb(11,107,71)opens the page with that color.