Skip to content

st7789v wrong color #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
a442509097 opened this issue Feb 3, 2024 · 2 comments
Open

st7789v wrong color #122

a442509097 opened this issue Feb 3, 2024 · 2 comments

Comments

@a442509097
Copy link

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

IMG_20240203_162627

@makermelissa
Copy link
Collaborator

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.

@neowashumanizedcode
Copy link

Hi Mel,
I'm using - 1.8" TFT Display Breakout and Shield with an EYESPI breakout

To fix this issue on st7735 in class ST7735R(ST7735):

Change
(_MADCTL, b"\xc8"),
to
(_MADCTL, b"\xc0"),

works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants