Get default theme in python

Hi,

I am currently working on adding new features to a module I shared recently called streamlit-float.

The issue I am having is getting the default theme colors. Through searching, I have found a way to get them if custom theme has already been provided in a config.toml file. But I have no way of getting the default colors when no custom theme is enforced.

My worry is that I will have to create bi-directional component whose only function is to return the theme it gets inside a ComponentProps object which the wrapper function withStreamlitConnection provides.

Is there a way I can avoid that?

Hey @bouzidanas,

Unfortunately, there isnโ€™t a built-in way to retrieve which theme is currently being used, but we do have an open GitHub Issue for this request here โ€“ please upvote it / share your thoughts if youโ€™d like to see it prioritized

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.