py-shinyswatch icon indicating copy to clipboard operation
py-shinyswatch copied to clipboard

Capture theme color changes made via `.add_defaults()`

Open gadenbuie opened this issue 1 year ago • 0 comments

From https://forum.posit.co/t/compileerror-when-trying-to-customize-a-shiny-theme/189700/6

It'd be reasonable for us to watch for key color values being changed via .add_defaults() to update the .colors property.

from shinyswatch.theme import minty as shiny_theme

shiny_theme = shiny_theme.add_defaults(
    primary="#aa00ff",
    secondary="#bfff00",
)

print(shiny_theme.colors.primary)
# NOT "#aa00ff"

gadenbuie avatar Aug 19 '24 16:08 gadenbuie