Screen colors: red, green and blue
๐ In short
Look at a screen through a magnifying glass and you'll discover a secret: every dot is made of three tiny lights, red, green and blue. When the computer changes how strong each one is, millions of colors appear, from sunshine yellow to flower purple.
๐คฉ Did you know?
- With just three lights, a screen can show more than 16 million colors.
- A phone screen has millions of tiny dots, and each dot has three lights.
- Our eyes have special cells for red, green and blue, which is why engineers chose these three colors.
- If you put a tiny drop of water on a screen, you'll see the three lights magnified underneath!
๐ Find out more
๐ Mixing light isn't like mixing paint
When painting, mixing all the colors gives a dark color. With light it's the opposite: red, green and blue together at full strength make white! And red with green makes yellow, which surprises a lot of people.
๐ Black means the light is off
When the computer wants to draw a black dot, it switches off its three lights. That's why a switched-off screen is black.
๐ก Colors as numbers
A computer stores every color as three numbers: how much red, green and blue, each from 0 to 255. So (255, 0, 0) is pure red and (255, 255, 0) is yellow.
๐ฏ Even in cameras
A camera works the same way but in reverse: it measures how much red, green and blue light there is at every point of the picture and stores it as numbers.
๐งญ Screens and printers
A printer works differently: it doesn't light up but mixes inks: cyan, magenta, yellow and black. That's why a printed picture's colors can look slightly different from the screen.
๐ Colors as short codes
Designers sometimes write colors as codes like #FF0000 for red: one pair for red, one for green and one for blue. They're the same three numbers written a shorter way.
๐ See how it works
๐ Key words
- Pixels
- The smallest dot in a picture
- RGB
- Red, green and blue
- Resolution
- The number of pixels in a screen or picture
๐งช Try it at home
Look at a screen with a magnifying glass, or put a tiny drop of water on an old phone's screen with your parents' permission, and look for the red, green and blue dots. Then wipe the water off!
๐งฉ Test yourself
1 Which three colors make all the colors on a screen?
2 What do red light and green light make together?