LambdaLabTM
Artificial Intelligence · Class 10 · Unit 5 · Computer Vision
class 10 aicomputer vision⏱️ 8 min read

Grayscale and RGB Images

A pixel holds either one number or three. That is the whole difference between a grayscale image and a colour one — and “how do computers store RGB images?” is a two-mark board question.

1Grayscale images

Grayscale
Images that have a range of shades of gray without apparent colour. The darkest possible shade is black, the total absence of colour or a pixel value of 0. The lightest is white, the total presence of colour or a value of 255.

A grayscale image has each pixel of size 1 byte, holding a single plane of a 2D array of pixels. Its size is defined as the height × width of the image.

2RGB images

All the coloured images around us are made up of three primary colours: Red, Green and Blue. Every colour that exists can be made by combining different intensities of those three.

How computers store RGB images
Every RGB image is stored in the form of three different channels — the R channel, the G channel and the B channel. Each plane separately has many pixels, with each pixel value varying from 0 to 255. All three planes combined form a colour image, so each pixel has a set of three values which together give that pixel its colour.

Press R, G, B below and the three planes slide apart. That stack is the answer to the exam question, drawn.

A picture, taken apart

Every photograph in digital form is made of pixels. Drag sideways to turn the grid and look along it.

The same picture pulled apart into its three channels. Each plane holds one number per pixel, from 0 to 255. Stacked back together, they give every pixel its colour.

Each channel on its own looks like a grayscale image, because a single channel is one number per pixel — which is exactly what grayscale is.

Why each channel looks grey
Split apart, the individual layers look like grayscale images. That is not a coincidence: a single channel is one number per pixel, which is exactly what grayscale is. The number happens to mean “how much red” rather than “how bright”, and again 0 means none of it and 255 means all of it.

Three sheets of coloured acetate

Imagine three transparent sheets, one printed in red ink, one in green, one in blue, each only in shades of its own colour. Lay them on top of one another and hold them to the light, and a full-colour picture appears. Take them apart and each is a grey-looking pattern of intensity.

3What the combinations give

R, G, BColourWhy
255, 255, 255WhiteAll three at full — the total presence of colour
0, 0, 0BlackAll three at zero — the total absence of colour
255, 0, 0RedOnly the red channel is on
Equal values, e.g. 128, 128, 128A shade of greyVary all three together and you move along the grey scale

4Side by side

GrayscaleRGB
Values per pixelOneThree
Planes / channelsA single planeThree: R, G and B
Size of one pixel1 byte3 bytes — one per channel
Range of each value0 to 2550 to 255, for each channel

5From the board papers

1
How do computers store RGB images?CBSE board exam 2026
2 marks
▶Show the answer

Every RGB image is stored in the form of three different channels — the R channel, the G channel and the B channel. Each channel is a separate plane of pixels, and each pixel value in it varies from 0 to 255.
All three planes combined form the colour image, which means each pixel has a set of three different values that together give that pixel its colour.

2
What is the output colour when R = G = B = 255? And when R = G = B = 0?Class X handbook, RGB activity
1 mark
▶Show the answer

255, 255, 255 gives white — the total presence of colour.
0, 0, 0 gives black — the total absence of colour.
Keeping all three equal at any value in between gives a shade of grey.

6Check yourself

Quick Check

How many values does each pixel of an RGB image hold?

Quick Check

In a grayscale image, a pixel value of 0 means:

Quick Check

What are the three channels of an RGB image?

Quick Check

How much memory does one pixel of a grayscale image take?