The picture stays in the tab.
A screenshot of a client's dashboard has names, numbers and a session token in the corner. Reducing it to five colours should not require handing it to a server in another country.
Pikkola Color Studio, tool No. 14
A contrast ratio, eight colour formats, six harmonies and the five colours inside a photograph. Four instruments in one page, and every one of them reads the colour in your tab and nowhere else.
Cocoa on cream, the pair this page is set in on a bright morning.
Studio
Check a pair before it ships, move a colour between formats, build a palette from one hue, or pull the colours out of a screenshot. Nothing here needs an account or an upload.
Contrast is a budget
Body copy at sixteen pixels, the size most of a page is set in. If this line asks for effort, the ratio is under four and a half.
Small print at thirteen pixels, where half a point of ratio is felt.
Button labelContrast ratio
14.24:1
AAA
Large means 24 pixels, or 18.66 pixels when the weight is bold.
These two shades of the text colour are the nearest that reach 4.5 to 1 on this background. Press one to keep it.
Relative luminance 0.017 and 0.897
HEX, rgb(), hsl(), hwb(), oklch() and oklab() are read directly. A named colour or anything else the browser knows is read through a canvas, so the page still makes no request.
Each swatch carries its ratio against white and against black, so a set can be checked for text use before it becomes a theme.
Drop a picture here
PNG, JPEG, WebP or SVG. It is read in the tab and never leaves it.
Five colours, weighted by how much of the picture each one covers. Transparent pixels are ignored.
Reference
WCAG 2.1 defines contrast with relative luminance, not with a screenshot. Here is the whole calculation, so a result on this page can be checked against any other tool.
| Text | AA | AAA |
|---|---|---|
| Normal, under 24 pixels | 4.5:1 | 7:1 |
| Large, 24 pixels or bold 18.66 | 3:1 | 4.5:1 |
| Icons, borders and focus rings | 3:1 | 3:1 |
A ratio above the line is the floor, not the ceiling. A page can pass every row in this table and still be unusable at arm's length, and a page that fails a row is hard to read for someone with low vision in a bright room. Both are worth fixing.
Why this one
A screenshot of a client's dashboard has names, numbers and a session token in the corner. Reducing it to five colours should not require handing it to a server in another country.
A number alone does not say whether to darken the text or lighten the panel. The two nearest shades that reach the line are offered beside the failure, with the ratio each of them reaches.
CSS custom properties, a Tailwind theme object and plain JSON: the three shapes that end up in a repository. No proprietary palette file that needs this site to open it.
The colours and the image live in the form and on a canvas. Closing the tab throws them away, which is the point when the image is an unreleased screen.
Read the privacy noteQuestions
No. The image is read with the browser's file reader, drawn on a canvas in the page and reduced to five colours there. There is no request in the page at all, and the content security policy blocks every other origin.
The WCAG 2.1 relative luminance formula on the sRGB channels, with the 0.03928 and 2.4 transfer function and the (L1 + 0.05) / (L2 + 0.05) ratio. The same numbers as the W3C's own examples.
AA asks for 4.5 to 1 on normal text and 3 to 1 on large text. AAA asks for 7 to 1 and 4.5 to 1. Large means at least 24 pixels, or 18.66 pixels when the text is bold.
No. It makes the text readable. Focus states, form labels, alt text, motion and the meaning carried by colour are separate obligations that a ratio cannot check.
There are two common conventions, one with L in the 0 to 1 range and one with L as a percentage, and browsers also clip to the sRGB gamut. This page converts through linear sRGB and reports the CSS form, so the value pastes into a stylesheet as written.
The picture is drawn at a maximum of 240 pixels on the long edge, its pixels are grouped by median cut into five buckets, and each bucket's average becomes a colour. Transparent pixels and near-identical colours are dropped first. A picture with fewer than five distinct colours returns fewer swatches.
Yes. Every panel has a copy button for CSS custom properties, a Tailwind theme object, a JSON file or a plain list of hex values. Nothing is added to the values beyond the names colour-1 to colour-5.
Made by one person, free to use