I know I can import colors so I can use deep-purple lighten-4 in JS, how would I actually do that in the Vuetify theme section below? Do I need to add a Vue.use(colors)
?
import Vue from 'vue'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.css'
import colors from 'vuetify/es5/util/colors'
import App from './App'
import router from './router'
Vue.use(Vuetify, { theme: {
primary: '#ee44aa',
secondary: '#424242',
accent: '#82B1FF',
error: '#FF5252',
info: '#2196F3',
success: '#4CAF50',
warning: '#FFC107'
}})
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
render: h => h(App)
})
so for example in your variables. scss you can have the following code: $material-dark: ( 'background': #464994, 'text': ( 'theme': #944646, ) ); this will rewrite the default colors for the background and text color in the dark mode.
To set background color with Vuetify, we can add our own theme colors. import Vue from "vue"; import Vuetify from "vuetify/lib"; import colors from "vuetify/lib/util/colors"; const vuetify = new Vuetify({ theme: { themes: { light: { primary: colors. purple, secondary: colors. grey.
This can be easily changed. Simply pass a theme property to the Vuetify constructor. You can choose to modify all or only some of the theme properties, with the remaining inheriting from the default. You can also use the pre-defined material colors.
Vuetify uses SASS/SCSS to craft the style and appearance of all aspects of the framework.
From the docs:
import Vue from 'vue'
import Vuetify from 'vuetify'
import colors from 'vuetify/es5/util/colors'
Vue.use(Vuetify, {
theme: {
primary: colors.blue.darken4,
secondary: colors.amber.lighten2
}
})
Any theme color you don't specify inside the theme object is just given its default value by Vue.
just use the color="" <- then your desired color ex.
<v-btn color="success">Success</v-btn>
here is my sample pen for further more example
https://codepen.io/pen/?editors=1010
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With