In RGB images each pixel has a particular
color; that color is described by the amount of red,
green and blue in it. If each of these components has
a range 0–255, this gives a total of 256^3 different
possible colors. Such an image is a “stack” of three
matrices; representing the red, green and blue values
for each pixel. This means that for every pixel there
correspond 3 values. Whereas in greyscale each pixel
is a shade of gray, normally from 0 (black) to 255
(white). This range means that each pixel can be
represented by eight bits, or exactly one byte. Other
greyscale ranges are used, but generally they are a
power of 2.so,we can say gray image takes less space
in memory in comparison to RGB images.