In Tailwind CSS v4.1, the way to customize colors has changed. Instead of defining colors in tailwind.config.js, you now define them in globals.css using CSS variables:

Then you can easily use these colors in your elements:


A new way to define your custom colors using CSS variables instead of tailwind.config.js in version 4.1.
September 16, 2025In Tailwind CSS v4.1, the way to customize colors has changed. Instead of defining colors in tailwind.config.js, you now define them in globals.css using CSS variables:

Then you can easily use these colors in your elements:
