Nerwyn / material-rounded-theme

A Material You and Google Home app influenced theme for Home Assistant
Apache License 2.0
79 stars 8 forks source link

Same Variable for Material You Color for different users #32

Open NikolasRupp opened 2 days ago

NikolasRupp commented 2 days ago

If you define multiple Material You colors by using the variables sensor.material_rounded_base_color_name_1 & sensor.material_rounded_base_color_name_2 is there a way to access the color via a variable or a sensor that has always the same name but has different colors depending on the user that is logged in.

For example i want to make a custom:button_card and want to have the material You color as background. Ist there a way so i can for example use

type: custom:button-card
entity: test.entity
styles:
  card:
    - background-color: var(--material-rounded-base-color)

and the color will change depending on the user that is logged in

Nerwyn commented 1 day ago

You can assign the theme base color per user as described in the README. You could try changing --primary-color and --accent-color in the styles of a card, but that is outside of the scope of this theme. --material-rounded-base-color is not a valid CSS custom variable defined by this theme.

NikolasRupp commented 1 day ago

Oh thank you. I must have overread that. Is it possible to use the color when u use the no mod version? I use the section layout and have some problems with the changes that are made with the modded version but want to use the colors.

Nerwyn commented 1 day ago

Nope. The colors rely on card-mod.