Generate a Tailwind palette
generate_paletteCreate a full Tailwind CSS 50-950 palette from any color and get ready-to-paste theme, config, or CSS output, with shades matching Tailwind's own.
Instructions
Generates 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 | |
| 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. Defaults to theme for v4 and config for older versions | |
| 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 | ||
| format | Yes | ||
| output | Yes | ||
| shades | Yes | ||
| inputShade | Yes | Shade that holds the input color unchanged, e.g. 500 | |
| 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) |