Customizing Colors

Customizing the default sidebar & topbar color palette for your project.

Tailwind includes an expertly-crafted default color palette out-of-the-box that is a great starting point if you don’t have your own specific branding in mind.

Generating colors palette

If you’re wondering how we automatically generated the 50–950 shades of each color, bad news — color is complicated and to get the absolute best results we picked all of Tailwind’s default colors by hand, meticulously balancing them by eye and testing them in real designs to make sure we were happy with them.

If you are creating your own custom color palette and don’t feel confident doing it by hand, UI Colors is a great tool that can give you a good starting point based on any custom color.

How to change main (Primary) color?

If you’d like to completely replace the default color palette with your own custom colors, add your colors directly under the theme.colors section of your configuration file:

module.exports = { theme: { extend: { colors: { custom: { 50: colors.blue[50], 100: colors.blue[100], 200: colors.blue[200], 300: colors.blue[300], 400: colors.blue[400], 500: colors.blue[500], // Using Tailwind's color palette 600: colors.blue[600], 700: colors.blue[700], 800: colors.blue[800], 900: colors.blue[900], 950: colors.blue[950], }, }, }, } }
How to change body color?

If you’d like to completely replace the default color palette with your own custom colors, add your colors directly under the theme.colors section of your configuration file:

const colors = require('tailwindcss/colors'); module.exports = { theme: { extend: { colors: { 'body': colors.slate[800], //text-color 'body-bg': colors.slate[100], 'body-bordered': colors.white, }, }, } }