Repository navigation
Arduino GFX vs. Adafruit GFX — Differences in Color Reproduction #820
|
When the same RGB565 image is displayed on the same LCD device, the color reproduction on that LCD is expected to be identical. However, the reality seems to be different. With Arduino GFX, the colors appear to be off. If looking closely at the original image, the top of the panda's head appears slightly pinkish, whereas the Adafruit GFX version looks closer to the original. So, my question: Is there a way to match the color reproduction? Thank you. Sample ImageOriginal
Adafruit GFX
Arduino GFX
Test environment
H/W
S/W
Sketch#include <Arduino.h>
#include <SPI.h>
#include "panda.h"
#define TFT_BLACK 0x0000
// GPIO pin assignment
#define TFT_RST D8 // 8
#define TFT_DC D9 // 9
#define TFT_CS CS // 10
#define TFT_MOSI MOSI // 11
#define TFT_MISO MISO // 12
#define TFT_SCLK SCK // 13
#define TFT_BL -1 // Connect directly to 3.3V
#define SPI_FREQUENCY 24000000 // The maximum is 24MHz for UNO R4 (4MHz is relatively stable)
#if false
//--------------------------------------------------------------------------------
// Adafruit GFX
//--------------------------------------------------------------------------------
#include <Adafruit_ILI9341.h>
#define GFX(f) tft.f
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#else
//--------------------------------------------------------------------------------
// Arduino GFX
//--------------------------------------------------------------------------------
#include <Arduino_GFX_Library.h>
#define GFX(f) tft->f
#define drawRGBBitmap draw16bitRGBBitmap
Arduino_DataBus *bus = new Arduino_HWSPI(TFT_DC, TFT_CS);
Arduino_GFX *tft = new Arduino_ILI9341(bus, TFT_RST);
#endif
void setup() {
GFX(begin(SPI_FREQUENCY));
GFX(fillScreen(TFT_BLACK));
GFX(setRotation(0));
GFX(drawRGBBitmap(0, 0, panda, PANDA_WIDTH, PANDA_HEIGHT));
}
void loop() {}RGB565 data
|
Answered by
moononournation
Oct 14, 2026
Replies: 1 comment 2 replies
|
Arduino_ILI9341 actually have 3 type init instruction sets defined, default using ili9341_type1_init_operations. you may try replace the code with or ili9341_type3_init_operations to check the effect. |
2 replies
Answer selected by
embedded-kiddie
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment










Arduino_ILI9341 actually have 3 type init instruction sets defined, default using ili9341_type1_init_operations. you may try replace the code
with
or ili9341_type3_init_operations to check the effect.