Created
March 25, 2021 22:46
-
-
Save ncot-tech/35c2263a7978edb48d03e7b640ab58b0 to your computer and use it in GitHub Desktop.
8 bit per pixel RGB C Macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//R3G3B2 | |
#define RGB2COLOUR(r,g,b) \ | |
(unsigned char)( \ | |
( \ | |
(r & 0x7) << 5 \ | |
) | \ | |
( \ | |
(g & 0x7) << 2 \ | |
) | \ | |
(b & 0x3) \ | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment