OPYEB

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.

0 bytes uploaded 0 external requests WCAG AA · AAA CSS · Tailwind · JSON · PNG

Drop a PNG, JPG, WebP or SVG

Any size, any shape. Ctrl+V pastes from the clipboard too.

—

Main palette

counted · spaced · 6 colours

Take it with you

copy or download

          

The 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 promised

01Six 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.

LevelNormalLarge
AA4.5:13:1
AAA7:14.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.

Questions

palette · contrast · export
Why does a photo give muddy colours?
Photographs contain thousands of near-neighbours per region, so each of the six boxes averages a wide spread and lands near grey. It is honest to the image: that is the dominant colour. For a brand palette, feed a flat logo or a screenshot instead of a photo, and the six boxes separate cleanly.
What if the image has fewer than six colours?
A flat logo can produce two or three boxes only. The remaining slots are filled with tints and shades derived from the dominant colour, so a monogram still gives a usable six-step scale instead of empty squares. Derived shades carry a 0% share, because no pixel landed on them.
Is the Tailwind export v4 or v3?
v4. It writes an @theme block with --color-cf-1 to --color-cf-6, which is how v4 declares theme colours; bg-cf-1, text-cf-1 and border-cf-1 then exist without a config file. A v3 project can paste the CSS variables into :root instead — the first tab is exactly that.
Does the tool keep my image?
No. There is no upload endpoint, no analytics and no local storage of pixels. The file is read into an <img>, painted onto a canvas, measured, and dropped when you close the tab. The footer counts external requests and it stays at 0.