Vuetify: [Feature Request] CSS color variables in RGB or HUE

Created on 8 Oct 2019  路  5Comments  路  Source: vuetifyjs/vuetify

Problem to solve

Variable colors for theming are based in HEX color: #FFFFFF
It is not possible to use functions like color : rgba(var(--v-primary-base),0.5); to add opacity to the background color.

Proposed solution

Change to RBG format: RGB(255, 255, 255) the color themes, so it can be more flexible to manipulate. This could also allow playing with the text color based on the background-color: https://css-tricks.com/switch-font-color-for-different-backgrounds-with-css/

RGB or HUE format

Theme enhancement major

Most helpful comment

I thought I'd opened this already but apparently not.

All 5 comments

I thought I'd opened this already but apparently not.

The ability to add opacity to the theme.themes object in the vuetify plugin would be quite helpful at times, though to my mind, an alternative solution would be to simply add opacity capability using hex (e.g. #000000de).

The ability to add opacity to the theme.themes object in the vuetify plugin would be quite helpful at times, though to my mind, an alternative solution would be to simply add opacity capability using hex (e.g. #000000de).

that would be interesting indeed. The idea of this request is to be able to read the color of a text with contrast enough, not about the opacity, please check the link: https://css-tricks.com/switch-font-color-for-different-backgrounds-with-css/#article-header-id-5

Apologies. I'll open a new issue. Thanks.

Does anyone know if there will be work on this feature?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

itanka9 picture itanka9  路  3Comments

efootstep picture efootstep  路  3Comments

chriswa picture chriswa  路  3Comments

gluons picture gluons  路  3Comments