Nesso N1: Why are TFT colors valid to Nesso?

M5GFX.h undefines then defines colors for M5 (and now Nesso N1), however eSPI_TFT/Bodmer TFT_colors are valid in Nesso sketches. How do TFT colors become valid Nesso colors? (I searched, but failed to find the definitions)

M5GFX.h starts naming colors here:

Hi @xfpd. Please provide a simple sketch that demonstrates the use of eSPI_TFT/Bodmer TFT_colors.

That information will allow us to effectively answer your question.

#include <Arduino_Nesso_N1.h>
#define KEY1_LEFT_PORTRAIT 3
NessoBattery battery;
NessoDisplay display;

int rotation = KEY1_LEFT_PORTRAIT, bgcolor = TFT_BLUE, fgcolor = TFT_WHITE, textsize = 1;

void setup() {
  battery.begin();         // Initialize battery library
  battery.enableCharge();  // Enable charging

  display.begin();
  display.clear();
  display.setRotation(rotation);
  display.fillScreen(bgcolor);
  display.setTextColor(fgcolor);
  display.setTextSize(textsize);
  display.setTextDatum(top_left);
  display.setFont(&fonts::FreeMono9pt7b);  // https://m5stack.lang-ship.com/howto/m5gfx/font/#font-list
  display.print("Hello, World!");
}

void loop() {}

OK, now it is clear. We start here of course:

which leads here:

then here:

then here:

and finally to the TFT_BLUE definition here:

The reason I asked this topic question is that some #define color (arbitrary/library) names worked for me and some did not (I think "BLACK" was one that made me try TFT colors, then wonder).

Nesso library understands sketches for a diverse set of libraries... except for ILI- colors, which got a big #undef.

Thank you for finding the source. I got lost around layer three.

You say, "TFT_TOMATO", I say, "TFT_TOMATO"