MICO icon indicating copy to clipboard operation
MICO copied to clipboard

lcd st7735 r-b colors are reversed

Open mpmarks opened this issue 8 years ago • 0 comments

I'm testing an Adafruit 1.8" ST7735 display. Its working with the LCD Module code with the following parameters: The maximum hardware spi speed is about 6MHz. Setting display type of lcd.ST7735B works fine for this module.

However the rgb colors are reversed - that is, red is blue and vice versa. That means that any of the predefined color constants that involve red or blue display the wrong colors.

This is a not such a big issue because its easy to write a function that creates the correct 16-bit color value reversing the r and b data: e.g. function rgb(r,g,b) return bit.bor(bit.lshift(b, 11), bit.lshift(g,5), r) end -- rgb

But it might be confusing to users that use the lcd color constants. It was for me at first.

I found the whole api really useful. Thanks for some great work.

mpmarks avatar Mar 15 '16 19:03 mpmarks