We did some head banging to figure this out. Wish it was documented somewhere, if it is please advise.
For a 16 bit RGB565 color:
red = ((color16 & 0xf800) >> 11) * 256 / 0x1f;
grn = ((color16 & 0x07e0) >> 5) * 256 / 0x3f;
blu = ((color16 & 0x0001f) >> 0) * 256 / 0x1f;
if(red > 0xff) red = 0xff;
if(grn > 0xff) grn = 0xff;
if(blu > 0xff) blu = 0xff;
color24 = (red << 16) + (grn << 8) + (blu << 0);
Not sure this is exactly how they implemented it, but it works.