pythoncoder wrote: ↑Wed Apr 21, 2021 5:25 pm
Given that you are using RGB565 with 16 bit color values I think you want something like this:
Thank you very much, Peter. It almost worked, but I have to change the function to:
Code: Select all
def rgb(g, b, r):
return ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3)
Note the different order of params, gbr, not rgb.
With the logical order, the colors are swapped,
but with the gbr options, the colors are right.
By the way, it is really hard to take a photo of that litle screen. Anyways, thank you very much for your help and for nano-gui.
Edit: it seems I am not able to show the images, the urls are:
https://imgur.com/RAqfZwN for the wrong colors and
https://imgur.com/TEqZlJV for the right ones.