# Colors

Out of the box you get access to all colors in the Material Design spec through sass and javascript. These values can be used within your style sheets, your component files and on actual components via the color class system.

# Classes

Each color from the spec gets converted to a background and text variant for styling within your application through a class, e.g. <div class="red"> or <span class="red--text">. These class colors are defined here.

Text colors also support darken and lighten variants using text--{lighten|darken}-{n}

# Javascript color pack

Vuetify has an optional javascript color pack that you can import and use within your application. This can also be used to help define your application’s theme.

// src/plugins/vuetify.js

import Vue from 'vue'
import Vuetify from 'vuetify/lib'

import colors from 'vuetify/lib/util/colors'

Vue.use(Vuetify)

export default new Vuetify({
  theme: {
    themes: {
      light: {
        primary: colors.red.darken1, // #E53935
        secondary: colors.red.lighten4, // #FFCDD2
        accent: colors.indigo.base, // #3F51B5
      },
    },
  },
})

# Sass color pack

While convenient, the color pack increases the CSS export size by ~30kb. Some projects may only require the default provided classes that are created at run-time from the Vuetify bootstrap. To disable this feature, you will have to manually import and build the main sass file. This will require a Sass loader and a .sass/.scss file entry.

// src/sass/main.scss

$color-pack: false;

@import '~vuetify/src/styles/main.sass';

Your created main.sass file will then need to be included in your project.

// src/index.js

import './src/sass/main.scss'
// OR
require('./src/sass/main.scss')

This can also be done within your main App.vue file. Keep in mind, depending on your project setup, this will increase build times as every time your entry file is updated, the Sass files will be re-generated.

<style lang="sass">
  $color-pack: false;

  @import '~vuetify/src/styles/main.sass';
</style>

# Material colors

Below is a list of the Material design color palette grouped by primary color

blue
blue 
#6185DB
blue lighten-1
#F9FBFF
blue lighten-2
#EAEFFA
blue lighten-3
#A2B4DF
blue lighten-4
#8AA5E8
blue darken-1
#4964A4
blue darken-2
#30426E
blue darken-3
#101038
blue darken-4
#585874
purple
purple 
#7D67BC
purple lighten-1
#FCFBFF
purple lighten-2
#E4E3FF
purple lighten-3
#BEAEED
purple darken-1
#5E4D8D
purple darken-2
#3F345E
purple accent-1
#CDCCE6
red
red 
#F03738
red lighten-1
#FFD4D4
red lighten-2
#F35F5F
red darken-1
#B4292A
red darken-2
#781C1C
green
green 
#13CE66
green lighten-1
#BDECD2
green lighten-2
#7BD9A5
green darken-1
#0FA552
green darken-2
#0A6733
yellow
yellow 
#FAD901
yellow lighten-1
#F7EFB8
yellow lighten-2
#EFDE72
yellow darken-1
#BCA301
yellow darken-2
#7D6D00
grey
grey 
#737373
grey lighten-1
#BABABA
grey lighten-2
#D9D9D9
shades
black
#000000
white
#FFFFFF
transparent

Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.
Edit this page on GitHub
Last updated:08/13/2020, 9:48:57 PM