@@ -50,7 +50,8 @@ class ButtonBase(Group):
50
50
:param Optional[str] name: A name, or miscellaneous string that is stored on the button.
51
51
:param Optional[str] label: The text that appears inside the button.
52
52
:param Optional[FontProtocol] label_font: The button label font. Defaults to ''terminalio.FONT''
53
- :param Optional[int] label_color: The color of the button label text. Defaults to 0x0.
53
+ :param Optional[Union[int, Tuple[int, int, int]]] label_color: The color of the button label text. Defaults to 0x0.
54
+ Accepts an int or a tuple of 3 integers representing RGB values. Defaults to an inverse of label_color.
54
55
:param Optional[Union[int, Tuple[int, int, int]]] selected_label: The color of button label text when the button is selected.
55
56
Accepts an int or a tuple of 3 integers representing RGB values. Defaults to an inverse of label_color.
56
57
:param Optional[int] label_scale: The scale factor used for the label. Defaults to 1.
@@ -66,7 +67,7 @@ def __init__(
66
67
name : Optional [str ] = None ,
67
68
label : Optional [str ] = None ,
68
69
label_font : Optional [FontProtocol ] = None ,
69
- label_color : Optional [int ] = 0x0 ,
70
+ label_color : Optional [Union [ int , tuple [ int , int , int ]] ] = 0x0 ,
70
71
selected_label : Optional [Union [int , tuple [int , int , int ]]] = None ,
71
72
label_scale : Optional [int ] = 1 ,
72
73
) -> None :
@@ -79,7 +80,7 @@ def __init__(
79
80
self ._selected = False
80
81
self .name = name
81
82
self ._label = label
82
- self ._label_color = label_color
83
+ self ._label_color = _check_color ( label_color )
83
84
self ._label_font = label_font
84
85
self ._selected_label = _check_color (selected_label )
85
86
self ._label_scale = label_scale
0 commit comments