How to use the color picker
Drag inside the color field to choose saturation and brightness, and move the hue slider to
change the base color. Prefer numbers? Type any value — #3B82F6, rgb(59, 130, 246), hsl(217, 91%, 60%), or oklch(0.62 0.19 260) — into any field and every other format updates instantly. Use
the alpha slider to add transparency. Click any code to copy it. Hit the eyedropper to sample a
color from anywhere on your screen, or load an image to pick a color from a photo or screenshot.
What is a HEX color code?
A HEX color code is a six-digit, hexadecimal representation of a color, written as #RRGGBB. Each pair of characters sets the intensity of one channel — Red, Green, and Blue — from 00 (none) to FF (full), which is 0 to 255 in decimal. For example, #FF0000 is pure red (red at maximum, green and blue at zero). Because each of the
three channels has 256 possible values, HEX codes describe exactly 16,777,216 colors (256 × 256 × 256). HEX is the most common way to specify color
on the web because it’s compact and unambiguous — every modern browser, design tool, and CSS file
understands it.
HEX, RGB, HSL, HSV, CMYK & OKLCH — which format should you use?
They all describe the same color in different number systems. Pick the one that fits the job:
| Format | Looks like | Best for |
|---|---|---|
| HEX | #3B82F6 | The web default — CSS, HTML, design tools |
| HEX8 | #3B82F680 | A web color with transparency (last pair = alpha) |
| RGB / RGBA | rgb(59, 130, 246) | Screens, code that manipulates channels, transparency via RGBA |
| HSL / HSLA | hsl(217, 91%, 60%) | Adjusting a color by hue, saturation, and lightness |
| HSV / HSB | hsv(217, 76%, 96%) | Color pickers and image editors (the “brightness” model) |
| CMYK | cmyk(76%, 47%, 0%, 4%) | Print — cyan, magenta, yellow, black inks |
| OKLCH | oklch(0.62 0.19 260) | Modern CSS — perceptually even lightness and clean shade scales |
HEX and RGB are the same information in different bases — #3B82F6 is exactly rgb(59, 130, 246). HSL and HSV make a color easier to adjust by hand. CMYK is for ink on paper and can’t reproduce every
screen color (bright screen colors often print duller). OKLCH is the newest
and is now supported in every major browser; it’s perceptually uniform, so equal
changes in its lightness value look like equal changes to your eye — which makes it the best
format for building consistent shade scales and accessible palettes.
Adding transparency: 8-digit HEX and alpha
To make a web color semi-transparent, add a fourth value — the alpha channel
— where 00 is fully transparent and FF is fully opaque. In HEX that
becomes an 8-digit code, #RRGGBBAA: for example #3B82F680 is blue at
about 50% opacity (80 hex ≈ 128 ≈ 50%). The same transparency in RGB is rgba(59, 130, 246, 0.5) and in HSL is hsla(217, 91%, 60%, 0.5). The
native browser color input can’t do alpha — Color Picker Lab can. Drag the alpha slider and copy any of
the three transparent formats.
Shades, tints, and tones
These are the three ways to vary a color:
- A tint is the color mixed with white — lighter and softer.
- A shade is the color mixed with black — darker and deeper.
- A tone is the color mixed with gray — muted and calmer.
Color Picker Lab generates a full scale of each from whatever color you pick, with the code under every swatch. Tints, shades, and tones are how you build a usable range — backgrounds, borders, hover states, and text — from a single brand color.
Color harmonies
Color harmonies are sets of colors that look good together because of where they sit on the color wheel. The common rules:
- Complementary — the color directly opposite (highest contrast).
- Analogous — the neighbors on either side (calm, cohesive).
- Triadic — three colors evenly spaced (balanced and vibrant).
- Split-complementary — a color plus the two neighbors of its opposite.
- Tetradic / square — four colors forming a rectangle on the wheel.
- Monochromatic — one hue at different lightness and saturation.
Pick any color and Color Picker Lab shows each harmony with copyable codes, so you can build a palette in seconds.
Color accessibility and contrast (WCAG)
If text and background don’t contrast enough, people can’t read it — so the Web Content Accessibility Guidelines (WCAG 2.1) set minimum contrast ratios. The thresholds:
- AA: at least 4.5:1 for normal text, 3:1 for large text (≈ 18px bold or 24px regular) and for user-interface elements.
- AAA: at least 7:1 for normal text and 4.5:1 for large text.
Color Picker Lab shows the contrast ratio of your color against black and white right next to the picker, with a clear pass/fail for each level — and can nudge a failing color to the nearest shade that passes. Use it before you ship so your colors are readable by everyone, including the roughly 1 in 12 men and 1 in 200 women with color-vision deficiency.
Exporting colors to code
When you’ve got a color or a palette, export it the way your project expects — CSS custom
properties, SCSS variables, a Tailwind theme (v4 @theme or a v3 config), JSON, or W3C
design tokens — all available from the export menu, with OKLCH included. Copy a single value, or
download the whole palette.
Frequently asked questions
- What is the HEX code for a color?
- A HEX code is the color written as
#RRGGBB, where each pair of characters is the red, green, and blue intensity from00toFF. Pick a color above and Color Picker Lab shows its HEX code; click to copy it. - How do I get the HEX code from an image?
- Use “Pick from image,” load your photo or screenshot, and click the pixel you want — Color Picker Lab returns its HEX, RGB, and HSL codes and can pull a full palette from the image.
- Is Color Picker Lab free?
- Yes. Every feature is free, there’s no signup, and your colors are processed entirely in your browser — nothing is uploaded.
- What’s the difference between HEX and RGB?
- None, mathematically — they’re the same red/green/blue values in different number systems.
#FF0000andrgb(255, 0, 0)are identical. - What is OKLCH and should I use it?
- OKLCH is a modern color format now supported in all major browsers. It’s perceptually uniform, so it’s the best choice for consistent shade scales and accessible color systems. Color Picker Lab outputs OKLCH for every color.
- Can I add transparency to a HEX color?
- Yes — use an 8-digit HEX code (
#RRGGBBAA) or RGBA/HSLA. Drag the alpha slider and copy any transparent format.