Hello. Why am I seeing 0x07E0 as lime green rather than 00FF00 as usual? Is there a table that has the values that adafruit GFX library is using instead?
void setup() {
Serial.begin(115200);
String hexstring = "B787B7";
long number = (long) strtol( &hexstring[1], NULL, 16);
int r = number >> 16;
int g = number >> 8 & 0xFF;
int b = number & 0xFF;
Serial.print("red is ");
Serial.println(r);
Serial.print("green is ");
Serial.println(g);
Serial.print("blue is ");
Serial.println(b);
}
void loop() {
}
How can this be modified for hex numbers in the form of 0x07E0 ?