Tailwind CSS v4 changed how colors are defined: from sRGB hex values to OkLCh notation, using the wider Display P3 gamut.
OkLCh is perceptually uniform, which makes color manipulation simpler and more predictable, and P3 makes the colors more vibrant.
This change opened up an interesting possibility: what if we could generate entirely new Tailwind-like palettes by interpolating between existing ones?
New Palettes
Tailwind v4 ships with 17 accent palettes (red, blue, green, etc.) and 5 neutral palettes (slate, gray, zinc, neutral, stone). In December 2025, the Oatmeal Kit by Tailwind Plus introduced 4 additional neutral palettes: Mauve, Mist, Olive, and Taupe.
neutral has zero chroma, so its hue is undefined and it can't be interpolated. It is excluded from the neutral set, which leaves 8 palettes: slate, gray, zinc, stone, and the four new ones. That is enough data points to fill the gaps between them through interpolation.
Tailwind CSS v4.2.0 (released 18/02/2026) ships these four palettes by default.
How It Works
Each Tailwind palette contains 11 shades (50, 100, 200...950). The idea is to use shade 500 as an anchor. It represents the «true» color of the palette and sits at a specific hue in OkLCh.
By mapping all known palettes to their anchor hues, we can:
- Take any hue input (0-360°)
- Find the two known palettes whose hues surround it
- Interpolate between them using linear interpolation (lerp)
- Generate a complete 11-shade palette
Because OkLCh is perceptually uniform, equal steps in the interpolation weight produce roughly equal visual changes, so the result moves smoothly from one palette to the other.
For example, for a palette at hue 100° (between yellow at ~86° and lime at ~130°), the algorithm interpolates lightness, chroma, and hue for each shade level between these two palettes, creating a cohesive new palette.
Playground
Here's an interactive demo:
Features:
- Drag the hue slider (0-360°) to generate palettes
- Toggle between accent and neutral sets
- Copy generated palettes as CSS custom properties
- Switch to grid view and click any shade to set it as the anchor
- Snap to the closest known Tailwind palette
Conclusion
This approach generates brand-specific palettes that feel native to Tailwind's design system.
Instead of being limited to the 26 shipped palettes, we can explore the full 360° hue range while keeping the Tailwind feel.
The technique works because OkLCh takes care of perceptual uniformity. In RGB or HSL, the same interpolation would give muddy or uneven results, and we would need curves calculated from luminance to compensate. In OkLCh, plain lerp is enough, and it is much simpler.