Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuetifyjs how to set custom RGBA color?

As explained here vuetify colors can be customized as

Vue.use(Vuetify, {
  theme: {
    primary: '#3f51b5',
    secondary: '#b0bec5',
    accent: '#8c9eff',
    error: '#b71c1c'
  }
})

but how can I use a custom RGBA color?

like image 774
user2809176 Avatar asked Oct 31 '25 14:10

user2809176


2 Answers

Vuetify's creators have said there is not their priorities to implement this feature...

like image 181
baddeveloper Avatar answered Nov 02 '25 09:11

baddeveloper


You can use Pseudo-class: ::after or ::before ,set background:var(--v-background-base); and opacity:0.4;.

for example:

  .liveServer__title {
    position: relative;
    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background: var(--v-background-base);
      opacity: 0.4;
      z-index: -1;
    }
  }
like image 40
zhao yue Avatar answered Nov 02 '25 08:11

zhao yue