RGB-matrix-Panel icon indicating copy to clipboard operation
RGB-matrix-Panel copied to clipboard

Add Support for unit32_t rgb values

Open Aerospacesmith opened this issue 10 years ago • 2 comments

For example : uint16_t RGBmatrixPanel::Color333(uint32_t c) { // RRRrrGGGgggBBBbb

uint8_t
  r = (uint8_t)(c >> 16),
  g = (uint8_t)(c >>  8),
  b = (uint8_t)c;

return ((r & 0x7) << 13) | ((r & 0x6) << 10) | ((g & 0x7) << 8) | ((g & 0x7) << 5) | ((b & 0x7) << 2) | ((b & 0x6) >> 1); }

Aerospacesmith avatar Jul 22 '14 03:07 Aerospacesmith