ColorForge · palette & contrast · zero upload
Six colours out of any image.
Contrast measured, not guessed.
Nothing leaves the tab.
Drop a screenshot, a photo or a logo and get its six main colours as HEX, RGB and HSL,
a live WCAG AA/AAA ratio for any pair, and the palette as CSS variables,
Tailwind v4 @theme, JSON or a 1080×1080 PNG card — read pixel by pixel on this device.
Drop a PNG, JPG, WebP or SVG
Any size, any shape. Ctrl+V pastes from the clipboard too.
Main palette
counted · spaced · 6 coloursTake it with you
copy or downloadThe card is drawn at 1080×1080 on a canvas in this tab and saved as PNG — the same colours and the pair you chose, with the ratio printed on it.
Palette card
—
How the numbers are made
measured, not promised01Six colours, counted then spaced
The image is scaled to 200 px on its long edge, then transparent pixels and antialiased edges are dropped so a blended rim never becomes a palette entry. What is left is folded into a 32×32×32 colour cube; the heaviest cube is taken first, and every cube within a minimum distance of it is skipped before the next pick. Six picks, six colours that are actually different — and a flat background keeps one slot instead of eating three.
02Contrast, WCAG 2
Relative luminance linearises each channel, then weights it 0.2126 R + 0.7152 G + 0.0722 B. The ratio is (L1 + 0.05) ÷ (L2 + 0.05), with the lighter colour on top, so it runs from 1:1 to 21:1. Nothing here is a judgement call — the badge is the comparison against the number.
| Level | Normal | Large |
|---|---|---|
| AA | 4.5:1 | 3:1 |
| AAA | 7:1 | 4.5:1 |
03Using the palette
Colour 1 is the most common pixel, which is usually the surface you build on; colours 5 and 6 are the accents that made the image interesting. Check every pair you actually ship — a ratio that passes on a swatch can fail once opacity, a gradient or a photo sits behind the text.