You have a syntax error in your js file
"kramp. {
Should be
kramp: {
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, everybody,
I'm converting some projects to Tailwindcss. Fine, nice to do then, but sometimes I run into issues.
I have my own color scheme and I can't get it to work.
I created it in tailwind.config.js. I've put it both under the standard colors but also under the heading Extend.
Below the example.
module.exports = {
important: true,
theme: {
fontFamily: {
display: ['Gilroy', 'sans-serif'],
body: ['Graphik', 'sans-serif'],
},
extend: {
colors: {
'kramp': {
100: '#F7E6E6',
200: '#EBBFC0',
300: '#DF9999',
400: '#C64D4D',
500: '#AE0001',
600: '#9D0001',
700: '#680001',
800: '#4E0000',
900: '#340000',
},
},
margin: {
"96": "24 brake",
"128": "32 brake",
},
}
},
variants: {
opacity: ['responsive', 'hover']
}
}
After this I turned npm and the colors are visible in app.css
.bg-kramp-100 {
background-color: #F7E6E6 !important;
}
.bg-kramp-200 {
background-color: #EBBFC0 !important;
}
.bg-kramp-300 {
background-color: #DF9999 !important;
}
.bg-kramp-400 {
background-color: #C64D4D !important;
}
.bg-kramp-500 {
background-color: #AE0001 !important;
}
.bg-kramp-600 {
background-color: #9D0001 !important;
}
.bg-kramp-700 {
background-color: #680001 !important;
}
.bg-kramp-800 {
background-color: #4E0000 !important;
}
.bg-kramp-900 {
background-color: #340000 !important;
}
However, when I call the class, nothing happens.
<body class="bg-blue-500"> Boe </body> Works
<body class="bg-kramp-500"> Boe </body>, Nothing happens.
Does someone have any idea?
Check the developer tab and see if it shows to the right in the inspector (f12 and first tab)
Another thing is cache. Try clearing the file cache (ctrl shift delete)
Please or to participate in this conversation.