The grayscale mode assigns eight bits (one byte) of data to each pixel.
Thus each pixel might be expressed in eight binary digits, such as:
00110001
or
00001111
or
10001110
Such images may be said to have a bit-depth of eight.
There are 256 possible values in all.
Each value corresponds to a shade of gray on a standard scale.
00000000
is black.
11111111
is white.
And so on.
256 shades of gray is fine... for a black and white photograph.
But color presents a problem.
We can stay at this bit-depth,
and be restricted to a maximum of 256 colors,
in the indexed color mode.
Or we can raise the bit-depth
and use the RGB mode.