Skip to content
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

Update image_converter.rgb_to_color565 to make converted colors more accurate. #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

echo-lalia
Copy link

Hello!
I noticed while working on a project, and using your display driver, that the original rgb_to_color565 code seems to output some inaccurate colors.

This is easy to test by passing (255, 255, 255), which should become 0xffff, but instead becomes 0xfff8.
I've replaced it with some code that outputs 0xffff, and otherwise just outputs more accurate colors.

The main st7789py.py file still uses the other implementation, but I was hesitant to change it because I haven't tested to see if there's a speed difference, or anything like that.

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

Successfully merging this pull request may close these issues.

None yet

1 participant