RGB represents a color by mixing red, green, and blue. Give each component a value from 0 to 255, or a percentage from 0 to 100: smaller numbers mean less intensity, larger numbers mean more. section 17.1
Combine the three channels to see how RGB behaves:
- One nonzero channel produces a pure color: (255, 0, 0) is red. section 17.1
- Two full-strength channels blend: red plus green makes yellow, red plus blue makes magenta, and green plus blue makes cyan. section 17.1
- Equal channel values create grayscale: (0, 0, 0) is black, (128, 128, 128) is gray, and (255, 255, 255) is white. section 17.1
- With 256 values for each channel, RGB offers more than 16 million possible colors. section 17.1




