You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the doc (https://nextjstemplates.com/docs/customization#customizing-colors) and tried to customize theme color, but after updating tailwind.config.ts and rerunning npm run dev, nothing changes. I wonder if the doc was bit of outdated and there is a new way of customizing colors, or maybe I just did it wrong.
I followed the doc (https://nextjstemplates.com/docs/customization#customizing-colors) and tried to customize theme color, but after updating tailwind.config.ts and rerunning npm run dev, nothing changes. I wonder if the doc was bit of outdated and there is a new way of customizing colors, or maybe I just did it wrong.
If you want to add custom colors while keeping the default colors intact, you can use the extend property within the theme section of your configuration. Here's how to do it:
import type { Config } from "tailwindcss";
const colors = require('tailwindcss/colors');
const config: Config = {
darkMode: "class",
content: [
"./src/pages//*.{js,ts,jsx,tsx,mdx}",
"./src/components//.{js,ts,jsx,tsx,mdx}",
"./src/app/**/.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
colors: {
...colors,
primary: "#1A202C", // Add your custom primary color
'custom-blue': '#1E90FF', // Example of adding a new color
'custom-green': '#32CD32', // Another custom color
},
},
},
plugins: [require("tailgrids/plugin")],
};
I followed the doc (https://nextjstemplates.com/docs/customization#customizing-colors) and tried to customize theme color, but after updating
tailwind.config.ts
and rerunningnpm run dev
, nothing changes. I wonder if the doc was bit of outdated and there is a new way of customizing colors, or maybe I just did it wrong.The text was updated successfully, but these errors were encountered: