Rocket opens the code for one plant photo. "There are no colors here," he groans. "Only numbers!"
Raven reads the first line: 255, 0, 0. "What do you notice? Every pixel has three numbers."
Nova blinks red, then green, then blue. "Here is a hint," she says. "Three numbers, three lights."
Rocket counts the blinks. Red, green and blue!
A screen makes each pixel's color by mixing light.
It mixes red, green and blue light. We call this RGB.
So a computer keeps three numbers for each pixel: red, green and blue.
Each number goes from 0 to 255.
A 0 means none of that light. A 255 means the most of that light.
| Red | Green | Blue | Color you see |
|---|---|---|---|
| 255 | 0 | 0 | red |
| 0 | 255 | 0 | green |
| 0 | 0 | 255 | blue |
| 0 | 0 | 0 | black (no light at all) |
| 255 | 255 | 255 | white (all three at the most) |
The smallest color value is 0. The biggest is 255.
A bigger number means more of that light.
A blue value of 200 has more blue light than a blue value of 50.
| Color value | Could it be a real color value? |
|---|---|
| 0 | ? |
| 255 | ? |
| 128 | ? |
| 300 | ? |
| 500 | ? |
Awesome number reading! Tomorrow you will paint a picture from a number grid.