50#ffffff
100#f9ffee
200#f3ffde
300#edffcd
400#e6ffbd
500#dfffac
600#d8ff9b
700#d0ff89
800#c8ff76
900#c0ff62
950#b7ff4c
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: '#f9ffee',
200: '#f3ffde',
300: '#edffcd',
400: '#e6ffbd',
500: '#dfffac',
600: '#d8ff9b',
700: '#d0ff89',
800: '#c8ff76',
900: '#c0ff62',
950: '#b7ff4c',
},
},
},
},
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: #f9ffee;
--color-custom-200: #f3ffde;
--color-custom-300: #edffcd;
--color-custom-400: #e6ffbd;
--color-custom-500: #dfffac;
--color-custom-600: #d8ff9b;
--color-custom-700: #d0ff89;
--color-custom-800: #c8ff76;
--color-custom-900: #c0ff62;
--color-custom-950: #b7ff4c;
}Individual Color Values
custom-50
#ffffff
custom-100
#f9ffee
custom-200
#f3ffde
custom-300
#edffcd
custom-400
#e6ffbd
custom-500
#dfffac
custom-600
#d8ff9b
custom-700
#d0ff89
custom-800
#c8ff76
custom-900
#c0ff62
custom-950
#b7ff4c
Learn more about customizing colors in Tailwind CSS