Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default colors given in tailwind documentation are not working

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?

like image 217
Poornima T Avatar asked Sep 02 '25 16:09

Poornima T


1 Answers

Your link is for 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

Color palette reference v2

So, just read this v2 docs if you want to configure your palette.

like image 160
Danila Avatar answered Sep 05 '25 08:09

Danila