Converts a standard 24-bit RGB color value into a format suitable for certain LED controllers.
The conversion swaps the red and green channels, producing a new 24-bit integer where:
The converted 24-bit LED color value with swapped red and green channels.
const rgb = 0x112233;const ledColor = convertRgbToLedColor(rgb); // → 0x221133
A 24-bit RGB color represented as a number (0xRRGGBB).
Generated using TypeDoc
Converts a standard 24-bit RGB color value into a format suitable for certain LED controllers.
The conversion swaps the red and green channels, producing a new 24-bit integer where:
Returns
The converted 24-bit LED color value with swapped red and green channels.
Example
Remarks