From palette to variables, checked on the page you are building
Recolor for front-end developers
Recolor (recolor.page) is a color palette tool for developers that ends in code: generate or paste a palette, check it on your real page or a saved build, and export CSS variables, a Tailwind v4 @theme block, SCSS or JSON. There is no account, the palette lives in the URL, and its engine is a working example of recoloring a whole site through CSS variables.
Last updated
| Need | In Recolor |
|---|---|
| Variables for a palette | Export, CSS tab: --color-1 and up, plus primary, secondary and accent |
| Tailwind v4 | Export, Tailwind tab: an @theme block |
| A palette on localhost | Save the page as HTML, upload it, set the asset base URL |
| Text contrast | AA badges per swatch; the page's own text kept readable |
| Sharing a palette | The URL: hex codes after #, the page in ?site= |
| Keyboard | Space, L, C, Cmd+Z or Ctrl+Z, Shift with the arrows |
Palette to code in a minute
Press Space until a palette works, or paste one: hex codes joined by hyphens after recolor.page/#, which is also
how a Coolors link opens. Load your page to see it in context, then press Export and copy the tab you need. The
output is plain text with no account and no watermark; Export formats shows every format, and
Tailwind v4 @theme colors covers using the block.
Checking on your actual build
Recolor fetches pages from the internet, so a dev server on localhost is refused by address. Save the rendered
page from the browser and upload it, with the asset base URL pointing at where its CSS, images and fonts can be
fetched, such as a preview deployment. Public preview deployments load directly by address. For a single-page app,
Scripts on runs your code in the sandbox; module scripts from another domain cannot load there, and Scripts off
shows the server's HTML instead. The limits are 5 MB of HTML, 10 seconds per
fetch and about 30 page loads a minute; the rest are on Limits.
The URL is the state
Everything you would put in a ticket is in the address: the palette after the #, the page in ?site=, and
scripts=0 when scripts are off. A link like this one opens a staging page without scripts in the default palette:
https://recolor.page/?site=https%3A%2F%2Fstaging.example.com%2F&scripts=0#264653-2a9d8f-e9c46a-f4a261-e76f51Paste it into a pull request or an issue and a reviewer sees what you saw. Locks, overrides and the mapping sliders stay out of the link; the URL format has the details.
How it recolors any site
If you are building theming yourself, the engine is a useful reference. It reads every stylesheet the page can read, gives each exact color a CSS variable, rewrites every declaration to use it while keeping priority and cascade order, and then changes only the variables. A new palette is one write of one style element. The mapping from page colors to swatches runs in OKLCH, with hue families, a lightness guard and a contrast check. How Recolor repaints a page explains it, and How to recolor a website with CSS variables turns it into steps for your own code.
From the keyboard
Recolor is built to stay on the keyboard. Space generates, L locks and C copies the color under the pointer or in focus, Cmd+Z or Ctrl+Z undoes, Shift with an arrow moves a color, and ? lists everything. Space and undo also work while the previewed page has the focus, unless you are typing in one of its fields. Every panel closes with Esc and gives the focus back to the button that opened it. The full list is on Keyboard shortcuts.
Common questions
Does Recolor have an API or a command line tool?
No. It is a web app; the palette is in the URL and every export is copied from the Export panel.
Can Recolor export a 50 to 950 shade scale?
No. It exports one value per swatch, 2 to 10 of them, plus three role names. Derive shades with color-mix() or a scale generator.
Does it work with my localhost dev server?
Yes, by upload: save the page as HTML and upload it. By address, local and private hosts are refused.
Does Recolor read the CSS variables my site already has?
Yes. It reads custom property definitions with the rest of the CSS, and repaints through them, so a site built on variables recolors as a whole.
Can I put a palette in a pull request?
Yes, as a link (the palette and the page are in the URL) or as the exported CSS, Tailwind or JSON.
Is Recolor's code open source?
No. The code is not public at the moment.
Sources
- Using CSS custom properties, MDN developer.mozilla.org
- Theme variables, Tailwind CSS docs tailwindcss.com