🇪🇸 Cambiar a la versión en español: Extractor Privado de Paleta de Colores
Extract the dominant color palette from any local image (PNG, JPG, WebP, SVG) strictly inside browser memory using HTML5 Canvas. Get instant HEX, RGB, HSL, CSS :root variables, and WCAG 2.1 text contrast ratios with zero server uploads.
Quantization & WCAG Luminance Math
Rather than sending confidential UI mockups or photos to a third-party backend, the extractor samples the raw <canvas> pixel buffer locally, skips transparent pixels (α < 128), groups RGB clusters by Euclidean distance (> 42), and evaluates relative luminance per W3C WCAG 2.1 and CSS Color Module Level 4:
RGB Bucket = round(c / step) × step | L = 0.2126·Rlin + 0.7152·Glin + 0.0722·Blin
Contrast Ratio = (Llighter + 0.05) / (Ldarker + 0.05)
WCAG 2.1 Readability Thresholds
| Conformance Tier | Minimum Ratio | Recommended UI Role |
|---|---|---|
| WCAG AA (Normal body text) | ≥ 4.5 : 1 | Body copy, input labels, UI buttons |
| WCAG AA (Large text ≥ 18 pt) | ≥ 3.0 : 1 | Display headings, hero badges, KPIs |
| WCAG AAA (Enhanced contrast) | ≥ 7.0 : 1 | Long-form technical articles & dark themes |
Frequently Asked Questions
Are uploaded files stored anywhere?
Never. Images decode directly via URL.createObjectURL into an off-thread memory buffer and local <canvas>; everything still works offline.
Why verify WCAG contrast right inside a palette extractor?
Saturated brand colors often fail legibility checks on mobile OLED panels outdoors; checking black-vs-white foreground pairings upfront prevents broken UI buttons.