Web Analytics Made Easy - Statcounter
Skip to content

Themes

The way to get Windows that have elements that have matching colors.

theme

Sets / Gets the current Theme. If none is specified then returns the current theme. This call replaces the ChangeLookAndFeel / change_look_and_feel call which only sets the theme.

theme(
    new_theme = None
)

Parameter Descriptions

Name Type Default Description
new_theme str None the new theme name to use
RETURN str the currently selected theme

theme_add_new

Add a new theme to the dictionary of themes

theme_add_new(
    new_theme_name,
    new_theme_dict
)

Parameter Descriptions

Name Type Default Description
new_theme_dict dict text to display in element
new_theme_name str text to display in element

theme_background_color

Sets/Returns the background color currently in use Used for Windows and containers (Column, Frame, Tab) and tables

theme_background_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
color str None new background color to use (optional)
RETURN str color string of the background color currently in use

theme_border_width

Sets/Returns the border width currently in use Used by non ttk elements at the moment

theme_border_width(
    border_width = None
)

Parameter Descriptions

Name Type Default Description
RETURN int border width currently in use

theme_button_color

Sets/Returns the button color currently in use

theme_button_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN (str, str) (str, str) - TUPLE with color strings of the button color currently in use (button text color, button background color)

theme_element_background_color

Sets/Returns the background color currently in use for all elements except containers

theme_element_background_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str (str) - color string of the element background color currently in use

theme_element_text_color

Sets/Returns the text color used by elements that have text as part of their display (Tables, Trees and Sliders)

theme_element_text_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str color string currently in use

theme_input_background_color

Sets/Returns the input element background color currently in use

theme_input_background_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str (str) - color string of the input element background color currently in use

theme_input_text_color

Sets/Returns the input element entry color (not the text but the thing that's displaying the text)

theme_input_text_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str (str) - color string of the input element color currently in use

theme_list

Returns a sorted list of the currently available color themes

theme_list()

Parameter Descriptions

Name Type Default Description
RETURN List[str] A sorted list of the currently available color themes

theme_previewer

Displays a "Quick Reference Window" showing all of the different Look and Feel settings that are available. They are sorted alphabetically. The legacy color names are mixed in, but otherwise they are sorted into Dark and Light halves

theme_previewer(
    columns = 12
)

Parameter Descriptions

Name Type Default Description
columns int 12 The number of themes to display per row

theme_progress_bar_border_width

Sets/Returns the progress meter border width currently in use

theme_progress_bar_border_width(
    border_width = None
)

Parameter Descriptions

Name Type Default Description
RETURN int border width currently in use for progress meters

theme_progress_bar_color

Sets/Returns the progress bar colors by the current color theme

theme_progress_bar_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN (str, str) (str, str) - TUPLE with color strings of the ProgressBar color currently in use(button text color, button background color)

theme_slider_border_width

Sets/Returns the slider border width currently in use

theme_slider_border_width(
    border_width = None
)

Parameter Descriptions

Name Type Default Description
RETURN int border width currently in use for sliders

theme_slider_color

Sets/Returns the slider color (used for sliders)

theme_slider_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str color string of the slider color currently in use

theme_text_color

Sets/Returns the text color currently in use

theme_text_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str (str) - color string of the text color currently in use

theme_text_element_background_color

Sets/Returns the background color for text elements

theme_text_element_background_color(
    color = None
)

Parameter Descriptions

Name Type Default Description
RETURN str (str) - color string of the text background color currently in use

Old Themes (Look and Feel) - Replaced by theme()

You should NOT use these calls. They are here for your reference should you run into them in existing code.

preview_all_look_and_feel_themes

Displays a "Quick Reference Window" showing all of the different Look and Feel settings that are available. They are sorted alphabetically. The legacy color names are mixed in, but otherwise they are sorted into Dark and Light halves

preview_all_look_and_feel_themes(
    columns = 12
)

Parameter Descriptions

Name Type Default Description
columns int 12 The number of themes to display per row

list_of_look_and_feel_values

Get a list of the valid values to pass into your call to change_look_and_feel

list_of_look_and_feel_values()

Parameter Descriptions

Name Type Default Description
RETURN List[str] list of valid string values

change_look_and_feel

Change the "color scheme" of all future PySimpleGUI Windows. The scheme are string names that specify a group of colors. Background colors, text colors, button colors. There are 13 different color settings that are changed at one time using a single call to ChangeLookAndFeel The look and feel table itself has these indexes into the dictionary LOOK_AND_FEEL_TABLE. The original list was (prior to a major rework and renaming)... these names still work... In Nov 2019 a new Theme Formula was devised to make choosing a theme easier: The "Formula" is: ["Dark" or "Light"] Color Number Colors can be Blue Brown Grey Green Purple Red Teal Yellow Black The number will vary for each pair. There are more DarkGrey entries than there are LightYellow for example. Default = The default settings (only button color is different than system default) Default1 = The full system default including the button (everything's gray... how sad... don't be all gray... please....)

change_look_and_feel(
    index,
    force = False
)

Parameter Descriptions

Name Type Default Description
force bool False no longer used
index str the name of the index into the Look and Feel table (does not have to be exact, can be "fuzzy")
RETURN None None