I'm trying to add custom theme colors via vuetify.js, but I can't seem to get it working
Closed this issue · 1 comments
GOvEy1nw commented
Hey, this isn't an issue with the app, but I was wondering if you might be able to explain to me how I can add custom colors to a theme, I've got this code, which as far as I can tell should work, but it's not changing anything:
import { createVuetify } from 'vuetify'
import { aliases, md } from 'vuetify/iconsets/md'
import * as components from 'vuetify/components'
import { md3 } from 'vuetify/blueprints'
// import * as directives from 'vuetify/directives'
export default defineNuxtPlugin(nuxtApp => {
const vuetify = createVuetify({
ssr: true,
blueprint: md3,
icons: {
defaultSet: 'md',
aliases,
sets: {
md
}
},
components,
theme: {
dark: true,
themes: {
dark: {
primary: '#2196F3',
secondary: '#424242',
accent: '#FFC107',
error: '#f44336',
warning: '#ffeb3b',
info: '#2196f3',
success: '#4caf50',
},
},
},
})
nuxtApp.vueApp.use(vuetify)
})
WongSaang commented
Hi, this is vuetify's documentation on theme configuration https://vuetifyjs.com/en/features/theme/