mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
16 lines
547 B
Python
16 lines
547 B
Python
|
from typing import Union, Tuple, List
|
||
|
|
||
|
|
||
|
class CTkAppearanceModeBaseClass:
|
||
|
def __init__(self):
|
||
|
|
||
|
def _apply_appearance_mode(self, color: Union[str, Tuple[str, str], List[str]]) -> str:
|
||
|
""" color can be either a single hex color string or a color name or it can be a
|
||
|
tuple color with (light_color, dark_color). The functions returns
|
||
|
always a single color string """
|
||
|
|
||
|
if type(color) == tuple or type(color) == list:
|
||
|
return color[self._appearance_mode]
|
||
|
else:
|
||
|
return color
|