Skip to content

Problem Loading Custom Themes #442

Answered by Akascape
avalon60 asked this question in Q&A
Discussion options

You must be logged in to vote

@avalon60 I am not getting any error while loading external themes,

I directly use this method for loading it:
customtkinter.set_default_color_theme("themepath/my_theme.json")

You have to specify the full path including the .json extension.

If you want to add the theme in site packages, then first paste the my_theme.json file inside the customtkinter>assets>themes folder and then add the new theme name in this list of theme_manager.

Like this:
built_in_themes = ["blue", "green", "dark-blue", "sweetkind", "my_theme"]
No need to add the .json file extension.

Then you can use it directly like this:
customtkinter.set_default_color_theme("my_theme")

I don't know if it will help or not...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@avalon60
Comment options

Answer selected by avalon60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants