rm-hull / luma.oled

Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED
https://luma-oled.readthedocs.io
MIT License
811 stars 163 forks source link

SSD1351 128x128 Color Issue #340

Closed yuniq-neko closed 2 years ago

yuniq-neko commented 2 years ago

Type of Raspberry Pi

Raspberry Pi 4B (4GB)

Linux Kernel version

Linux RPi-Dash-Cluster 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

Expected behaviour

RGB = RGB

Actual behaviour

RGB ≠ RGB

Red and Blue seem to have swapped, resulting in the palette becoming "BGR".

yuniq-neko commented 2 years ago

Photo: SwappedRedAndBlue Ignore the black line; its just from my camera catching the display refresh

rm-hull commented 2 years ago

If you look here (https://luma-oled.readthedocs.io/en/latest/api-documentation.html#luma.oled.device.ssd1351) at the API docs, there is a bgr= flag you can set to true. This should resolve the issue.

yuniq-neko commented 2 years ago

Apologies on the delay on responding to this, adding --bgr does indeed fix the issue. :)