Image Color Picker & Palette Extractor
Upload any JPG, PNG, WebP, or SVG image to pick exact pixel HEX, RGB, and HSL codes, extract a 6-color dominant palette, and check WCAG 2.1 AA/AAA text contrast locally in your browser.
Click Any Pixel to Pick Color
Picked Color & Contrast
#1D4ED8rgb(29, 78, 216)hsl(224, 76%, 48%)#FFFFFF): 6.70:1
AA Pass
#000000): 3.13:1
AA Large
Extracted Dominant Color Palette (6 Swatches)
#1D4ED8 Click to inspect#0F172A Click to inspect#059669 Click to inspect#F59E0B Click to inspect#DC2626 Click to inspect#7C3AED Click to inspectHow to Use HEX, RGB & WCAG Contrast for Web Design
Whether you are matching a client brand logo, building a CSS design system, or auditing UI accessibility, sampling colors directly in your browser keeps unpublished artwork completely private.
- HEX (
#1D4ED8): Compact 6-digit hexadecimal notation widely used in CSS, Figma, and design tokens. - RGB & HSL: Use RGB for canvas/alpha transparency (
rgba()) and HSL when generating lighter hover or darker active states by adjusting lightness. - WCAG 2.1 AA / AAA: Normal body text requires at least a 4.5:1 contrast ratio against its background (3.0:1 for large 18pt+ headings and UI borders; 7.0:1 for AAA).
Sampling Exact Brand Colors & Verifying WCAG 2.1 Accessibility Contrast
Extracting exact HEX, RGB, and HSL codes from logos, UI screenshots, or client mockupsโwhile simultaneously auditing WCAG 2.1 AA/AAA luminance contrastโensures your design system stays both visually consistent and legally accessible across desktop and mobile displays.
Step-by-Step Instructions
- Click Upload Image to load any local JPG, PNG, WebP, or SVG file directly onto the HTML5 canvas.
- Hover across the image to preview live pixel HEX values and click any pixel to lock it into the Color Inspector.
- Review the auto-extracted 6-swatch dominant palette and click Copy CSS Variables to export ready-to-use :root tokens.
- Verify White (#FFFFFF) and Black (#000000) contrast ratios against WCAG AA (4.5:1) and AAA (7.0:1) thresholds.
Worked Example & Methodology
Royal Cobalt (#1D4ED8) delivers a 6.70:1 contrast ratio with pure white textโcleanly passing WCAG AA normal text (4.5:1)โwhereas bright amber (#F59E0B) requires dark text (#000000 at 10.1:1) to remain legible.
Privacy & Verification: Images load strictly into local HTML5 Canvas memory and never transmit over the internetโsafe for confidential client artwork.
Frequently Asked Questions
What WCAG contrast ratio is required for body text vs. large headings?
WCAG 2.1 Level AA requires at least 4.5:1 for normal body text and 3.0:1 for large text (18pt+ / 24px regular or 14pt+ / 18.66px bold) and UI component borders.
When should I use HSL instead of HEX in CSS?
HSL (Hue, Saturation, Lightness) makes building hover states and dark-mode variants intuitiveโjust adjust the Lightness percentage by ยฑ8% while keeping Hue identical.
How does dominant palette extraction work?
The browser samples thousands of non-transparent pixels across the canvas, groups neighboring RGB color buckets, and averages the six most prevalent visual tones.
Can I pick colors from transparent PNG logos?
Yes! Transparent pixels (alpha < 50%) are automatically ignored during dominant palette extraction so your brand colors stand out cleanly.