Generate a Tailwind palette
generate_paletteGenerates a full Tailwind CSS palette (50-950) from one color, ready to paste. Call it whenever you add a color to a Tailwind theme (e.g. "add a brand color #db4d53"), instead of writing a single variable or inventing shades. The input color stays exactly at its best-fit shade, and the other shades follow the closest Tailwind color, so they look like Tailwind's own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Color name used in the code, e.g. "brand". Defaults to the closest Tailwind color, which replaces Tailwind's own palette of that name (e.g. red), so pass a name unless that is what the user wants | |
| color | Yes | Any CSS color: hex (#db4d53), rgb(), hsl(), oklch() or a named color | |
| plain | No | With output live or shopify: a plain :root block instead of @theme, for projects without Tailwind (like the Dawn theme) | |
| format | No | Color format. Defaults to oklch for v4 and hex for older versions | |
| output | No | theme: a v4 @theme block for the main CSS file. config: an object for theme.extend.colors in tailwind.config.js. css: plain CSS variables. live (v4 only): for a color picked at runtime (user, tenant or CMS setting): CSS where every shade follows one variable, --color-<name>, rebuilt in the browser with relative colors, with this palette as the fallback. shopify (v4 only): live, plus a settings_schema.json color setting and the Liquid line for snippets/css-variables.liquid, for Shopify themes where the merchant picks the color in the theme editor. Each part says which file it goes in. Defaults to theme for v4 and config for older versions | |
| semantic | No | With output live or shopify: also add --color-<name>-foreground for text on the color: white or the darkest shade, whichever contrasts more, following the runtime color | |
| tailwindVersion | No | The project's Tailwind CSS major version. Defaults to 4 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The palette as code, ready to paste | |
| name | Yes | ||
| avoid | No | White text on the input color, when it fails WCAG AA | |
| format | Yes | ||
| output | Yes | ||
| shades | Yes | ||
| inputShade | Yes | Shade that holds the input color unchanged, e.g. 500 | |
| readablePairs | No | Text and background pairs that pass WCAG AA. Use them for text and buttons in this color. Not for live and shopify outputs, whose shades change at runtime | |
| tailwindVersion | Yes | ||
| closestTailwindColor | Yes | Tailwind color whose curve the palette follows | |
| replacesTailwindColor | Yes | True when the code replaces a default Tailwind palette (default color name, theme or config output) |