Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint16_t color;
- // white
- color = 0b1111111111111111; // binary representation
- color = 0xFFFF; // hexadecimal representation
- color = 65535; // decimal representation
- // black
- color = 0b0000000000000000; // binary representation
- color = 0x0000; // hexadecimal representation
- color = 0; // decimal representation
- // yellow
- color = 0b1111111111100000; // binary representation
- color = 0xFFE0; // hexadecimal representation
- color = 65504; // decimal representation
- // blue
- color = 0b0000000000011111; // binary representation
- color = 0x001F; // hexadecimal representation
- color = 31; // decimal representation
- // red
- color = 0b1111100000000000; // binary representation
- color = 0xF800; // hexadecimal representation
- color = 63488; // decimal representation
- // green
- color = 0b0000011111100000; // binary representation
- color = 0x07E0; // hexadecimal representation
- color = 2016; // decimal representation
- // cyan
- color = 0b0000011111111111; // binary representation
- color = 0x07FF; // hexadecimal representation
- color = 2047; // decimal representation
- // magenta
- color = 0b1111100000011111; // binary representation
- color = 0xF81F; // hexadecimal representation
- color = 63519; // decimal representation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement