Can we add multiple colors in ui.colors? #4089
-
QuestionHi All, I was trying to add some custom colors using The reason is, I am trying to have a list of my own colors, which I save with some custom names like 'bright-blue', 'deep-blue' etc. This is what I am trying to do. In this case, label 'a' does not get any color, only the 2nd one gets the color. ui.colors(color1="#2D6DF6")
ui.label('a').classes('bg-color1')
ui.colors(color2="#EF5F17")
ui.label('b').classes('bg-color2') Please let me know if this is possible in anyway. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi All, Just now understood how to do this, just need to declare the colors together, instead of one by one :) So this works fine: ui.colors(color1="#2D6DF6", color2="#EF5F17")
ui.label('a').classes('bg-color1')
ui.label('b').classes('bg-color2') Thanks, |
Beta Was this translation helpful? Give feedback.
Hi All,
Just now understood how to do this, just need to declare the colors together, instead of one by one :)
So this works fine:
Thanks,
Anindya