Skip to content

Can't get custom colors working via "theme.extend" #3106

Answered by simonswiss
leo-petrucci asked this question in Help
Discussion options

You must be logged in to vote

Hello! 👋

Looks like you're missing the colors key in your extend:

const colors = require('tailwindcss/colors');

module.exports = {
  purge: ['./pages/**/*.tsx', './components/**/*.tsx'],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {
+      colors: {
        emerald: colors.emerald,
+      }
    },
  },
  variants: {
    extend: {},
  },
  plugins: [],
};

That should do it 👍

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@simonswiss
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by simonswiss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants