Skip to content

Commit 675beb4

Browse files
committed
foreground color
1 parent 906cd68 commit 675beb4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

adafruit_display_emoji_text.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ class EmojiLabel(Widget):
7676
FIVE_WIDES = [127947, 9977, 128105, 127948, 128104, 128065, 127987]
7777

7878
def __init__(
79-
self,
80-
text,
81-
scale=1,
82-
ascii_font=terminalio.FONT,
83-
# ruff: noqa: PLR0912, PLR0915, PLR1702
84-
# Too many branches, Too many statements, Too many nested blocks
79+
self,
80+
text,
81+
scale=1,
82+
ascii_font=terminalio.FONT,
83+
fg_color=0xFFFFFF,
84+
# ruff: noqa: PLR0912, PLR0915, PLR1702
85+
# Too many branches, Too many statements, Too many nested blocks
8586
):
8687
try:
8788
os.stat("emoji")
@@ -94,7 +95,8 @@ def __init__(
9495
self.font = ascii_font
9596
self.ascii_palette = displayio.Palette(2)
9697
self.ascii_palette[0] = 0x000000
97-
self.ascii_palette[1] = 0xFFFFFF
98+
self.ascii_palette.make_transparent(0)
99+
self.ascii_palette[1] = fg_color
98100
self._text = text
99101
self._width = 0
100102
self._height = 12

0 commit comments

Comments
 (0)