Color Depth
- RGB color is a 24-bit system (16 million colors)
- 8 bits (256 colors) for each channel (red, green, blue).
28x28x28 = 2(8 + 8 + 8) = 224x = 16,777,216
Bits | Colors | |
---|---|---|
1 | 21 = 2 | |
2 | 22 = 4 | |
3 | 23 = 8 | |
4 | 24 = 16 | |
5 | 25 = 32 | |
6 | 26 = 64 | |
7 | 27 = 128 | |
8 | 28 = 256 | |
16 | 216 = 65,536 | |
24 | 224 = 17 x 106 (millions) | |
32 | 232 = 4.3 x 109 |
RGB
- Three channels specified with decimal values (each channel 0 to 255):
rgb(50, 150, 0)
- Three channels specified with hexadecimal values (each channel 00 to ff):
#a51c30
- Three channels specified with percentage values (each channel 0% to 100%):
rgb(50%, 10%, 75%)