Seeeduino 2.8" TFT

On a side note, I made a useful function:

unsigned int fromRgb(unsigned char r,unsigned char g, unsigned char b)
{
return ((map(r,0,0xFF,0,0x1F) & 0x1F) << 11) + ((map(g,0,0xFF,0,0x3F) & 0x3F) << 5) + (map(b,0,0xFF,0,0x1F) & 0x1F);
}

converts 255,255,255 values from 0x0000 to 0xFFFF for the 2.8" TFT’s functions that accept color. Obviously you won’t get full 65535 resolution, but it makes making colors much easier.