Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Color macros by Kyoshiro
- #define RGBAToInt(%0,%1,%2,%3) ((16777216 * (%0)) + (65536 * (%1)) + (256 * (%2)) + (%3))
- #define IntToRGBA(%0,%1,%2,%3,%4) \
- (%1) = ((%0) >>> 24); (%2) = (((%0) >>> 16) & 0xFF); (%3) = (((%0) >>> 8) & 0xFF); (%4) = ((%0) & 0xFF)
- //You can use the RGBAToInt macro for defining colors (its far more clear than hex) and TONS more.
- #define COLOR_WHITE RGBAToInt(255,255,255,255)
- #define COLOR_RED RGBAToInt(255,0,0,255)
- #define COLOR_GREEN RGBAToInt(0,255,0,255)
- #define COLOR_BLUE RGBAToInt(0,0,255,255)
- #define COLOR_YELLOW RGBAToInt(255,255,0,255)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement