Defaults: Strength 70%, greys on Palette, every page color on Auto
Strength, neutral tint and overrides
Recolor (recolor.page) applies a color palette to a website in two parts. The page's background and its text take the palette's lightest and darkest swatches, the other way round on a dark page, and every grey between them keeps its place between the two. The page's color families take the other swatches by rank. Strength (70% by default) sets how far page colors move towards their swatch, the Greys row switches the greys to a tint of swatch 1 instead, and Site colours pins any page color to a swatch or keeps it.
Last updated
src/shared/mapping.ts and the app's Mapping panel, checked November 14, 2026| Setting | Default | What it does |
|---|---|---|
| Strength | 70% | How far a page color moves towards its swatch; at 0% only the hue changes and the greys stay |
| Greys | Palette | Palette: the page's background and text move towards the lightest and darkest swatches. Tint: the greys take a tint of swatch 1 |
| Neutral tint | 15%, Tint only | How much the greys take the hue of swatch 1, up to 0.06 chroma |
| The text's swatch | 4 swatches and up | No color family shares it; with two or three swatches the families take it too |
| Lightness guard | 0.35 to 0.6 | Lightness shifts up to 0.35 pass in full, shifts of 0.6 and more are held back |
| Hue family | 25 degrees | Page colors this close in hue move together onto one swatch |
| Pale tints | Lightness 0.9 and up, 0.3 and under | A faint color in a page color's hue that carries no text moves with that color, not with the greys |
| Text contrast | 4.5:1, 3:1 for large text | Text keeps at least the contrast it had, up to these ratios |
| Per page color | Auto | Auto follows the rank; a swatch pins it; Keep original leaves it |
Which page color goes to which swatch
The engine weighs every color by how much of the page it covers: the elements its rules reach, with extra weight for backgrounds by their area. Colors whose hues lie within 25 degrees form a family, so a brand's darker hover, its lighter badge and the far end of its gradient stay with the brand. Families are ranked by weight times chroma, which puts the brand ahead of a dark text color that is used more but barely colored.
The families take the swatches that are not the page's background's, in palette order, and from 4 swatches up they leave the text's swatch alone too. With the default 5 swatches that leaves 3: family 1 takes the first of them, family 2 the next, and family 4 the first again. Because order is meaning, dragging a swatch to another place moves the page's colors with it. Inside a family, the main color moves onto the swatch and the others keep their offset in hue and their place in lightness relative to it, so a family of shades stays a family of shades. How many colors a site needs is the subject of how many colors a website palette needs.
Greys
Greys, near-whites and near-blacks are most of a screen, and they are not ranked with the colors. With Greys on Palette, the default, the page's background is the grey most of its text sits on, and its text color the grey most of that text is in, at least 0.1 apart in OKLCH lightness; a page without such a text color gets black or white opposite its background in its place. A swatch equal to one of the two takes it, so the page's own palette gives both back. Otherwise, on a light page the lightest swatch takes the background and the darkest the text, the other way round on a dark page. Each moves towards its swatch as a family's main color does, and those two swatches say "page" and "text" on the rail.
Every other grey keeps its place between the two: a grey halfway between the background and the text stays halfway, so borders, muted text and panels keep their order. Past either end a grey moves less the nearer it is to black or white, which stay as they are: on a light grey page, a white card stays white. A page that paints no background of its own shows the browser's white, and that white is its background too, so a white page takes the palette's lightest color.
A pale tint of a page color is not a grey, though: a faint color within 25 degrees of that color's hue, light enough for a card or a tile (OKLCH lightness 0.9 and up, like a brand's mint cards) or dark enough for a band (0.3 and under, like a footer in its near-black), counts as that color and follows its swatch, unless it carries text.
Tint is the look of before. The greys keep their lightness and take the hue of swatch 1, at a chroma of up to 0.06 times the Neutral tint setting (15% by default), and never more than sRGB has room for at that lightness, so white stays white and black stays black. At 0% they are exactly what they were. Swatch 1's tools say "tints greys" while it does.
Strength
Strength is how far a color travels, in OKLCH. The hue always becomes the swatch's hue. Chroma and lightness move from the page's value towards the swatch's by the Strength fraction: at 0% the page keeps its own lightness and chroma and only takes the palette's hues, and its greys stay as they are; at 100% each color becomes its swatch color, where the guard allows. The page's background and text travel the same way.
The guard is about lightness. A shift of up to 0.35 in OKLCH lightness passes in full; from there the allowed share falls in a straight line to nothing at 0.6. A dark navy hero under a pale yellow swatch therefore turns into a dark olive rather than a pale yellow, and the white text on it stays readable. The reasoning, with OKLCH explained, is in why a dark hero stays dark.
Text stays readable
The engine reports which text sits on which background. After mapping, each pair is checked with the WCAG contrast ratio. Where a pair reads worse than it did on the original page, and worse than 4.5:1 (3:1 for large text), the colors that moved give back the smallest part of their lightness shift that makes it read again. If even the original lightness does not read under the new hue, the text moves away from its background. Black or white text on a color explains the ratio itself.
Overrides in Site colours
The Site colours panel lists every color the page shows, heaviest first, with its weight, the properties it is used for and how often. Each has a menu: "Auto" with where it goes now (a swatch, or for a grey the page's background, its text or between the two), "Swatch 1" to the last swatch, and "Keep original". A color pinned to a swatch becomes a family of its own on it and shows a "Pinned" pill; a kept color stays as the page had it. The small chips under each swatch's name are the page colors it replaces, and clicking one opens the panel on that color.
Every change is one undo step, and Reset all puts every color back on Auto. Overrides belong to the page you see: loading another page, or reading the page again, clears them. They are not part of the link, which holds only the palette, as the URL format shows.
Use site colours and Reset
The Mapping panel has Strength, the Greys row with Neutral tint under Tint, Reset, which returns the sliders to 70% and 15% and leaves the Greys choice as it is, and Use site colours. That fills the unlocked swatches with the page's own colors: its main colors first, then its background and its text, then the greys between them, so with that palette every page color maps to itself. It is the quickest way to start from a site's real palette and change one color at a time, and it gives every SVG picture back as the page drew it. Four switches sit under them: "Animate changes", "Recolor SVG pictures" and "Hide cookie banners", on by default, and "Grey images"; Loading a page says which banners go. The Greys choice stays in this browser; the rest of the engine is on How Recolor repaints a page.
Common questions
Can I choose which page color a swatch replaces?
Yes. Open Site colours, find the color, and pick a swatch in its menu. It stays there until you change it, reset it or load another page.
Does dragging the swatches into another order change the page?
Yes. The color families take the swatches in order, so moving a color ahead of the others makes it the page's main color, and the lightest and darkest swatches go to the background and the text wherever they sit.
Does a white page stay white?
No, not by default: white is most pages' background, so it moves towards the palette's lightest swatch by Strength. With Greys on Tint, white stays white.
At 100% Strength, does the page use exactly the palette's colors?
No, not always. The lightness guard holds back shifts over 0.35, and the contrast check can give some lightness back so text stays readable.
Can I get the greys of before back?
Yes. Choose Tint in the Mapping panel's Greys row: the greys take 15% of the tint of swatch 1, and at Neutral tint 0% they stay exactly as they were.
Are overrides kept in the link?
No. The link holds the palette and the page's address; overrides belong to the page on screen and go when another page loads.
Can I start from the page's own colors?
Yes. Use site colours in the Mapping panel fills the unlocked swatches with them, and the page then maps to itself until you change a swatch.
Sources
- A perceptual color space for image processing (Oklab), Björn Ottosson bottosson.github.io
- oklch(), MDN developer.mozilla.org
- Understanding success criterion 1.4.3: contrast (minimum), W3C w3.org