Color Scheme Switcher

I couldn’t find where this existed already, so I created it! Some simple code you can use in your apps to dynamically/programmatically change the color scheme from among the built-in ones. Anvil | Login

You can easily add your own color schemes to the file as well. I hope this helps someone!

5 Likes

Worth linking this thread too:

thanks very much for this. very handy!

1 Like

This works very nicely. Thank you.

However…

The docs say that app.theme_colors is a read only dict.

Is the fact that using it to set colours works something we can rely on?

Yes - we added write support but looks like we didn’t update the api docs.

When it was read only, using theme colors in this way would have raised an exception.

3 Likes

Excellent! That’s exactly the answer I was hoping for!

1 Like