<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Unified.h Graphic Colors Don&#x27;t Match Variables]]></title><description><![CDATA[<p dir="auto">I tried to draw a graph using the M5.Lcd.fillRect() but I can't seem to be able to load the colors into a Variable:</p>
<pre><code>#include &lt;M5Unified.h&gt;

void setup() {
  Serial.begin(115200);
  auto cfg = M5.config();
  cfg.led_brightness = 255;
  M5.begin(cfg);
}

void loop() {
  //White
  M5.Lcd.fillRect(10, 20, 50, 10, WHITE);
  uint32_t Color = WHITE;
  Serial.print("Color WHITE = ");
  Serial.println(Color);
  M5.Lcd.fillRect(10, 40, 50, 10, Color);
  Color = TFT_WHITE;
  Serial.print("Color TFT_WHITE = ");
  Serial.println(Color);
  M5.Lcd.fillRect(10, 60, 50, 10, Color);

  //Green:
  M5.Lcd.fillRect(80, 20, 50, 10, GREEN);
  Color = GREEN;
  Serial.print("Color GREEN = ");
  Serial.println(Color);
  M5.Lcd.fillRect(80, 40, 50, 10, Color);
  Color = TFT_GREEN;
  Serial.print("Color TFT_GREEN = ");
  Serial.println(Color);
  M5.Lcd.fillRect(80, 60, 50, 10, Color);

  while (1)    ;
}

https://drive.google.com/file/d/1bo_OfbBQ5SA3hC-_SwRJyUKUOu8QNMk_/view?usp=sharing

I'm sure this is an issue with all the other graphical calls, not just the fillRect().

How do I find out what the Color variable is in the fillRect(x,y,z,d,**COLOR**) variable is?
      Is this a bug?

I'm using an M5 Core2 AWS.

Sir Michael
</code></pre>
]]></description><link>https://community.m5stack.com/topic/7346/m5unified-h-graphic-colors-don-t-match-variables</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 13:16:00 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7346.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Mar 2025 17:10:26 GMT</pubDate><ttl>60</ttl></channel></rss>