Extend Tailwind with your custom color palettes. From single colors to full design systems with shade scales.
1
Configure
Add your colors to tailwind.config.js
2
Use Utilities
Apply with bg-, text-, border- classes
3
Build & Ship
Tailwind generates only used classes
Tailwind CSS v4: colors in CSS with @theme
Tailwind CSS v4 (released January 2025) moved configuration into CSS. Instead of tailwind.config.js, you declare colors as --color-* variables inside an @theme block, and Tailwind generates bg-, text-, border- and other utilities from them. The tailwind.config.js examples further down still apply to v3 projects (and to v4 projects that load a legacy config with @config).
Because theme values are real CSS variables, you can also use them directly: color: var(--color-brand);. To remove all default colors in v4, add --color-*: initial; at the top of the @theme block. Tailwind v4's own default palette is defined in OKLCH, so its shades look slightly more vivid than the v3 HEX values.
Basic Configuration
Add a single custom color to your Tailwind theme. The simplest way to extend Tailwind's color palette.