Skip to content

ThemeDefinition

ttkbootstrap.style.ThemeDefinition

A class to provide defined name, colors, and font settings for a ttkbootstrap theme.

__init__(self, name, colors, themetype='light') special

Parameters:

Name Type Description Default
name str

The name of the theme.

required
colors Colors

An object that defines the color scheme for a theme.

required
themetype str

Specifies whether the theme is light or dark.

'light'
Source code in ttkbootstrap/style.py
def __init__(self, name, colors, themetype=LIGHT):
    """
    Parameters:

        name (str):
            The name of the theme.

        colors (Colors):
            An object that defines the color scheme for a theme.

        themetype (str):
            Specifies whether the theme is **light** or **dark**.
    """
    self.name = name
    self.colors = Colors(**colors)
    self.type = themetype