I was trying to use colors such as amber and lime, which are mentioned in the documentation. These colors didn't work. Only colors with names such as the primary color name (eg. red, pink) worked.
Colors which are not working: amber, emerald, lime, rose, fuchsia, slate, zinc, and even orange.
I'm using version 2.26, but I used the Tailwind playground to check the versions between 1.9 and 2.25, and still these colors didn't work. Even in the playground, these color names are not suggested.
Why can't I use these colors?
This is documentation for Tailwind version 3, it has expanded color palette.
You either need to update to version 3 or use version 2 documentation and expand palette manually, like that:
// tailwind.config.js
const colors = require('tailwindcss/colors')
module.exports = {
theme: {
extend: {
colors: {
// you can either spread `colors` to apply all the colors
...colors,
// or add them one by one and name whatever you want
amber: colors.amber,
emerald: colors.emerald,
}
}
}
}
More info about v2 color customization
So, just read this v2 docs if you want to configure your palette.