MCPcopy Create free account
hub / github.com/BruceDevices/firmware / alterOneColorChannel565

Function alterOneColorChannel565

src/core/settings.cpp:263–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263uint16_t alterOneColorChannel565(uint16_t color, int newR, int newG, int newB) {
264 uint8_t r = (color >> 11) & 0x1F;
265 uint8_t g = (color >> 5) & 0x3F;
266 uint8_t b = color & 0x1F;
267
268 if (newR != 256) r = newR & 0x1F;
269 if (newG != 256) g = newG & 0x3F;
270 if (newB != 256) b = newB & 0x1F;
271
272 return (r << 11) | (g << 5) | b;
273}
274
275bool setCustomUIColorMenu() {
276 while (1) {

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected