ThemeDefinition
Encapsulates the name, color palette, and metadata for a ttkbootstrap theme.
A ThemeDefinition is a lightweight container that pairs a theme name with its Colors object and whether it is a light or dark theme. The Style engine consumes ThemeDefinition instances to build widget styles and images for the active theme.
Source code in src/ttkbootstrap/style.py
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | |
__init__(name, colors, themetype=LIGHT)
Parameters:
name (str):
The name of the theme.
colors (Colors or dict):
A Colors instance or a dict of color values.
themetype (str):
Specifies whether the theme is **light** or **dark**.
Source code in src/ttkbootstrap/style.py
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | |