Adafruit_CircuitPython_RGB_Display icon indicating copy to clipboard operation
Adafruit_CircuitPython_RGB_Display copied to clipboard

st7789v wrong color

Open a442509097 opened this issue 2 years ago • 2 comments

from adafruit_rgb_display.st7789 import ST7789
display.fill(color565(255, 0, 0))

IMG_20240203_162627

a442509097 avatar Feb 03 '24 08:02 a442509097

Some displays are BGR order rather than RGB or the other way around. For now, you can either try changing the MADCTL value at https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/blob/main/adafruit_rgb_display/st7789.py#L146 from 0xC0 to 0xC8 or the one at https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/blob/main/adafruit_rgb_display/st7789.py#L101 from 0x08 to 0x00. Honestly though, it's common enough that we should add a parameter to do this automatically. Also, we should probably change it to be done in one operation rather than 2.

makermelissa avatar Feb 06 '24 17:02 makermelissa