0

displayio background color
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

displayio background color

by kwalkerk on Sat Feb 20, 2021 2:26 pm

Is there a straight forward way to change the background color of the display using displayio? I know I can load a bitmap into a tilegrid, group, etc. Would like to avoid the overhead using a bitmap takes up.

I'm using a PyPortal, but cannot use that library for other reasons.

kwalkerk
 
Posts: 86
Joined: Wed Jan 11, 2017 11:54 am

Re: displayio background color

by tannewt on Sat Feb 20, 2021 8:46 pm

There isn't a way to change the default. The most efficient way is using a shape for the background. (See the library here: https://github.com/adafruit/Adafruit_Ci ... lay_Shapes ) It'll produce more pixels without multiple bytes per pixel.

tannewt
 
Posts: 2189
Joined: Thu Oct 06, 2016 8:48 pm

Re: displayio background color

by kwalkerk on Sun Feb 21, 2021 11:14 am

Thanks! That worked like a charm.

kwalkerk
 
Posts: 86
Joined: Wed Jan 11, 2017 11:54 am

Please be positive and constructive with your questions and comments.


cron