Open In App

How to Customize the Default Color Palette in Tailwind CSS ?

Customizing the Default Color Palette in Tailwind CSS involves modifying the theme section of the tailwind.config.js file. By adjusting the color values or adding new ones, you can tailor the palette to match your project’s design requirements.

Syntax

// tailwind.config.js

module.exports = {
theme: {
extend: {
colors: {

// Add or override colors here
primary: '#4A90E2',
secondary: '#FFA500',
},
},
},

// Other Tailwind configurations...
};

Important Attributes

Attribute Description
theme Object-containing properties to customize the appearance of your application or design.
extend Object that lets you add or override properties in the existing theme, providing customization.

Key Features

Article Tags :