We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39431ec commit eae4cb4Copy full SHA for eae4cb4
adafruit_display_text/label.py
@@ -171,6 +171,19 @@ def color(self):
171
def color(self, new_color):
172
self.palette[1] = new_color
173
174
+ @property
175
+ def background_color(self):
176
+ """Color of the background as an RGB hex number."""
177
+ return self.palette[0]
178
+
179
+ @background_color.setter
180
+ def background_color(self, new_color):
181
+ if new_color:
182
+ self.palette[0] = new_color
183
+ self.palette.make_opaque(0)
184
+ else:
185
+ self.palette.make_transparent(0)
186
187
@property
188
def text(self):
189
"""Text to display."""
0 commit comments