50#ffffff
100#ffffee
200#ffffdc
300#ffffcb
400#ffffb9
500#ffffa7
600#ffff95
700#ffff82
800#ffff6e
900#ffff57
950#ffff3b
How to Install
1
Open your tailwind.config.js file
Locate the configuration file in your project's root directory.
2
Add the color palette to your theme
Copy the following configuration into your theme's colors section:
module.exports = {
theme: {
extend: {
colors: {
custom: {
50: '#ffffff',
100: '#ffffee',
200: '#ffffdc',
300: '#ffffcb',
400: '#ffffb9',
500: '#ffffa7',
600: '#ffff95',
700: '#ffff82',
800: '#ffff6e',
900: '#ffff57',
950: '#ffff3b',
},
},
},
},
plugins: [],
}3
Use the colors in your HTML/JSX
You can now use your custom colors with Tailwind utility classes:
<!-- Background color -->
<div class="bg-custom-500">...</div>
<!-- Text color -->
<p class="text-custom-700">...</p>
<!-- Border color -->
<div class="border-custom-300">...</div>
<!-- Hover states -->
<button class="bg-custom-500 hover:bg-custom-600">...</button>Alternative: CSS Variables
If you prefer using CSS custom properties, here are the variables:
:root {
--color-custom-50: #ffffff;
--color-custom-100: #ffffee;
--color-custom-200: #ffffdc;
--color-custom-300: #ffffcb;
--color-custom-400: #ffffb9;
--color-custom-500: #ffffa7;
--color-custom-600: #ffff95;
--color-custom-700: #ffff82;
--color-custom-800: #ffff6e;
--color-custom-900: #ffff57;
--color-custom-950: #ffff3b;
}Individual Color Values
custom-50
#ffffff
custom-100
#ffffee
custom-200
#ffffdc
custom-300
#ffffcb
custom-400
#ffffb9
custom-500
#ffffa7
custom-600
#ffff95
custom-700
#ffff82
custom-800
#ffff6e
custom-900
#ffff57
custom-950
#ffff3b
Learn more about customizing colors in Tailwind CSS