diff --git a/adafruit_display_text/bitmap_label.py b/adafruit_display_text/bitmap_label.py index 3f96db0..7c2f8b6 100755 --- a/adafruit_display_text/bitmap_label.py +++ b/adafruit_display_text/bitmap_label.py @@ -110,9 +110,11 @@ class Label(LabelBase): :param int outline_size: The size in pixels of the outline stroke. Defaults to 1 pixel. :param Optional[displayio.Palette] color_palette: The palette to use for the Label. - Indexes 0, 1, and 2 will be filled with background, foreground, and outline colors - automatically. Indexes 3 and above can be used for accent colors. - :param Optional[int] max_characters: The number of characters that sets the fixed-width. + Indexes 0, 1, and 2 will be used for background, foreground, and outline colors + respectively. Indexes 3 and above can be used for accent colors. ``color``, + ``background_color``, and ``outline_color`` arguments will be ignored if + ``color_palette`` is used. + :param Optional[int] ax_characters: The number of characters that sets the fixed-width. Default is None for unlimited width and no scrolling :param float animate_time: The number of seconds in between scrolling animation @@ -173,8 +175,6 @@ def __init__( "using accents." ) self._palette = color_palette - self.color = self._color - self.background_color = self._background_color else: _background_color = self._palette[0] _foreground_color = self._palette[1] diff --git a/examples/display_text_accent_example.py b/examples/display_text_accent_example.py index 97bc1d5..166f57e 100644 --- a/examples/display_text_accent_example.py +++ b/examples/display_text_accent_example.py @@ -18,12 +18,14 @@ main_group = displayio.Group() accent_palette = displayio.Palette(6) +accent_palette[1] = 0xAAAAAA accent_palette[2] = 0x000000 accent_palette[3] = 0xDDDD00 accent_palette[4] = 0xFFFFFF accent_palette[5] = 0x652F8F +accent_palette.make_transparent(0) -accent_lbl = Label(terminalio.FONT, color_palette=accent_palette, text="", color=0xAAAAAA) +accent_lbl = Label(terminalio.FONT, color_palette=accent_palette, text="") accent_lbl.anchor_point = (0, 0) accent_lbl.anchored_position = (4, 4) main_group.append(accent_lbl) diff --git a/examples/display_text_accent_scrolling_example.py b/examples/display_text_accent_scrolling_example.py index b2e96df..2294426 100644 --- a/examples/display_text_accent_scrolling_example.py +++ b/examples/display_text_accent_scrolling_example.py @@ -11,10 +11,12 @@ text = "Hello world CircuitPython Labels are awesome!" accent_palette = displayio.Palette(7) +accent_palette[1] = 0xAAAAAA accent_palette[3] = 0x3774A7 accent_palette[4] = 0xFFD748 accent_palette[5] = 0xFFFFFF accent_palette[6] = 0x652F8F +accent_palette.make_transparent(0) scrolling_label = Label( terminalio.FONT, @@ -22,7 +24,6 @@ max_characters=20, animate_time=0.3, color_palette=accent_palette, - color=0xAAAAAA, scale=2, )