X Xerobit

Color Picker

Pick a color. See it in Hex, RGB, HSL, and OKLCH. Check WCAG AA/AAA contrast against any background. Get a harmony palette. Share the URL — the hash encodes the color.

Formats
HEX
RGB
HSL
OKLCH
WCAG Contrast
Large text · 24px
Normal text — The quick brown fox jumps over the lazy dog.
Harmony palette

Complement · Analogous ±30° · Triadic 120° · Split-complement 150°

Ready. Pick a color to see all formats and WCAG contrast.

Live Market Insight

Source: DataForSEO · Updated 2026-04-25
Monthly searches (US)
74,000
keyword: "hex color picker"
Keyword CPC
$2.83
avg. advertiser bid
Related cluster
WCAG contrast
2 sibling keywords
Top competitor
redketchup.io
2/10 SERPs

How to use the color picker

  1. Click the large swatch to open your OS color picker, or type a hex code directly.
  2. Read the color in all four formats (Hex, RGB, HSL, OKLCH). Click Copy on any row.
  3. Set a background color to check WCAG contrast. The ratio and AA/AAA pass/fail appear live.
  4. Click any swatch in the harmony palette to make it the new selection.
  5. Use the URL hash (auto-updated) to share the exact color with a teammate.

Hex, RGB, HSL, OKLCH — which to use in 2026

All four describe the same color, but each has a different super-power:

Why OKLCH matters in 2026

Pick a pure yellow at HSL 60°, 100%, 50%. Now pick a pure blue at HSL 240°, 100%, 50%. Same lightness, right? No. The yellow looks dramatically brighter than the blue, because HSL's "L" is the mathematical mid-point of the RGB cube — not what your eye perceives as equally bright. OKLCH fixes this: its lightness axis is tuned to human perception, so oklch(60% ...) is perceptually the same lightness regardless of hue. Every browser released after late 2023 supports oklch() natively in CSS.

WCAG contrast, in one paragraph

The Web Content Accessibility Guidelines define four thresholds based on the contrast ratio between foreground and background: AA Large (3:1) for 18pt+ or 14pt bold, AA Normal (4.5:1) for body text, AAA Large (4.5:1), and AAA Normal (7:1). Aim for AA Normal on every body-text pair, AAA when you can. This tool shows all four badges live so you can see exactly which thresholds pass.

The harmony palette

The five swatches under the color represent classic color-theory relationships, computed in HSL:

Click any swatch to make it the active color. These are starting points — real palettes usually need manual tuning for lightness and saturation, which is where OKLCH shines.

Frequently asked questions

Does this color picker work offline?

Yes. Once the page has loaded, everything runs in your browser. Disconnect from the internet and the picker, format conversions, contrast checker, and palette all keep working. Bookmark the page or use "install as app" for a one-click desktop color picker.

How accurate is the OKLCH conversion?

The conversion uses Björn Ottosson's Oklab matrices from the CSS Color Module 4 specification — the same math the browsers use when rendering oklch() CSS. Round-trip (sRGB → OKLCH → sRGB) is lossless within rounding. You can verify by pasting the generated OKLCH string into CSS and confirming the rendered color matches.

Why does my WCAG ratio look different from another tool's?

The ratio in Xerobit follows WCAG 2.1 §1.4.3 exactly: convert each color's sRGB channels to linear sRGB via the standard gamma curve, then weight as Y = 0.2126R + 0.7152G + 0.0722B, and compute (L1 + 0.05) / (L2 + 0.05). Some tools use WCAG 3's experimental APCA algorithm which gives different numbers. APCA is not a WCAG requirement yet — for compliance work, use 2.1's ratio (what this tool shows).

Can I share a color link?

Yes. The URL hash auto-updates as you pick (e.g., /tools/color-picker#10b981). Copy the full URL and send it — opening the link restores that exact color.

Is alpha (transparency) supported?

Not in the current version. Every format shown is opaque. Alpha handling (RGBA, HSLA, OKLCH with alpha) is on the roadmap. For now, append /0.5 to any OKLCH or RGB string or use #RRGGBBAA 8-digit hex manually.

What's the difference between HSL and HSV?

HSL's third axis is lightness: 0% is black, 100% is white, 50% is the "pure" color. HSV's third axis is value: 0% is black, 100% is the pure color (never white). Designers usually prefer HSL for palette work; HSV is more common in graphics apps. If you need HSV, convert via the HSL output — or ask and I'll add HSV as a fifth format.

Related tools

Further reading

Pillar

Part of Dev Productivity — regex, cron, timestamps, HTTP, color, word counter, aspect ratio, case.


Written and maintained by Mian Ali Khalid. Last updated 2026-04-25.