Color theme
ColorTheme
A dataclass representing a complete color theme, containing subthemes, color pairs, and standalone colors.
Specific kwargs
| Argument |
Type |
Description |
primary |
ColorSubTheme |
primary color subtheme. |
secondary |
ColorSubTheme |
secondary color subtheme. |
tertiary |
ColorSubTheme |
tertiary color subtheme. |
error |
ColorSubTheme |
error color subtheme. |
background |
ColorPair |
background color pair. |
surface |
ColorPair |
surface color pair. |
surface_variant |
ColorPair |
surface variant color pair. |
outline |
tuple |
outline color tuple. |
inverse_surface |
ColorPair |
inverse surface color pair. |
inverse_primary |
tuple |
inverse primary color tuple. |
name |
str |
name of the theme(default is 'Unnamed'). |
Methods
| Name |
Kwargs |
Description |
get_subtheme |
role: SubThemeRole |
returns the ColorSubTheme associated with the given role. |
get_pair |
role: PairColorRole |
returns the ColorPair associated with the given role. |
get_tuple |
role: TupleColorRole |
returns the color tuple associated with the given role. |
get |
any_role: Any |
returns the color data associated with any valid role enum. |
Getters
| Name |
ReturnType |
Description |
primary / secondary / tertiary / error |
ColorSubTheme |
access subthemes directly. |
background / surface / surface_variant / inverse_surface |
ColorPair |
access color pairs directly. |
outline / inverse_primary |
tuple |
access standalone colors directly. |
name |
str |
the name of the theme. |
Setters
| Name |
Kwargs |
Description |
primary / secondary / tertiary / error |
value: ColorSubTheme |
sets subthemes directly. |
background / surface / surface_variant / inverse_surface |
value: ColorPair |
sets color pairs directly. |
outline / inverse_primary |
value: tuple |
sets standalone colors directly. |
name |
value: str |
sets the name of the theme. |
Use case
Created with GGen v1.1.0 for nevu_ui v0.7.5