Ask any question about Tailwind CSS here... and get an instant response.
How can I customize Tailwind's default color palette?
Asked on Dec 05, 2025
Answer
To customize Tailwind's default color palette, you can extend or override the colors in your Tailwind configuration file. This allows you to define a custom set of colors that Tailwind will use throughout your project.
<!-- BEGIN COPY / PASTE -->
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
primary: '#1DA1F2',
secondary: '#14171A',
accent: '#657786',
},
},
},
}
<!-- END COPY / PASTE -->Additional Comment:
- Use the "extend" key to add new colors without removing existing ones.
- To completely replace the color palette, use the "colors" key directly.
- Custom colors can be used with Tailwind's utility classes, e.g., "bg-primary".
- Remember to restart your development server to see changes.
Recommended Links:
