Skip to content

Commit 72c5b62

Browse files
committed
fix constructor for visible black background color
1 parent 4d65e55 commit 72c5b62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_display_text/label.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, font, *, x=0, y=0, text=None, max_glyphs=None, color=0xffffff
7171
self.y = y
7272

7373
self.palette = displayio.Palette(2)
74-
if background_color or background_color == 0x000000:
74+
if background_color is not None:
7575
self.palette[0] = background_color
7676
self.palette.make_opaque(0)
7777
self._transparent_background = False
@@ -184,7 +184,7 @@ def background_color(self):
184184

185185
@background_color.setter
186186
def background_color(self, new_color):
187-
if new_color or new_color == 0x000000:
187+
if new_color is not None:
188188
self.palette[0] = new_color
189189
self.palette.make_opaque(0)
190190
self._transparent_background = False

0 commit comments

Comments
 (0)