Color Representation
Learn how colors are represented in a computer system.
What is a pixel?
A pixel is the most basic unit in digital graphics. It is represented as a dot or a square on a monitor display screen that can represent only one solid color. A one-bit pixel, as shown in the figure, can take only two values, 0 or 1.
One-bit pixel
That is how we can assign different numbers to each color in our palette and thus, represent the dot using a number. Naturally, we’d require more bits to do that.
A raster image
The basic unit that we started with was the dot. So, if we encode a sequence of rows and columns of dots, each with ...
A bitmap representing a black and white image