`label.py` does not allow `color=None`
kmatch98 opened this issue · 1 comments
kmatch98 commented
When using label.py
to create transparent text with color=None
the following error is received:
File "/lib/adafruit_display_text/label.py", line 105, in __init__
TypeError: color buffer must be a buffer, tuple, list, or int
Here is my input code:
from adafruit_display_text import label
...
text_area = label.Label(terminalio.FONT, text="Hello world", color=None)
The only time I envision that a Label’s color might be desired to be set to None
is when using the builtinFont where the background is done the “old way” that saves memory on the Clue.
In bitmap_label.py
we currently accommodate transparent text.
Main question: Should we accommodate transparent text color with label.py
? There are two cases where this might be used:
- Using transparent text as a way of hiding it.
- Using
BuiltinFont
with the “old way” of creating the background color and using transparent text.
kmatch98 commented
I don't think there are many use cases where label.py
would be used with transparent text, so I'm closing this as a non-issue.