individual color mapping not working
Closed this issue · 1 comments
MobtakerFanavariPayvar commented
I cannot work with individual colors nor custom colors which I have already defined in extend section of my configuration, for example:
nightwind: {
colors: {
'#1E208D': '#ff0000'
}
does not convert #1E208D to the color #fff0000 in the dark mode. I don't know if I'm misunderstanding something or doing something wrong
jjranalli commented
Hi, color mapping works when you link it to the relative tailwind color code (such as 'primary-600'). You can find more details on how to use mappings in the docs
In your case, assuming you mapped #1E208D to 'primary-600' in tailwind config, it would look like this
// tailwind.config.js
theme: {
// define custom color
extend: {
colors: {
primary: {
600: "#1E208D",
},
},
},
// define color mapping
nightwind: {
colors: {
primary: {
600: "#ff0000",
},
},
},
},