The number of colors visible on the display screen depends on the bit-depth, i.e., the number of bits used for each pixel on the display screen. A 24-bit depth display can show up to 16 million colors.
Before you start counting the number of LED crayons in your painting set, be advised that it could take a bit more time and patience than anticipated. Counting colors is not so straightforward a process as counting crayons or water colors.
Let’s start small, by asking how many colors there are in the smartphone display on which you’re reading this article, or the number of colors in the computer monitor display on which this article is being written.
The answer is… it depends!
What Is A Bit?
How easy it would be to count colors if there were only two—black and white. However, having variety makes life a bit more interesting. See how having more colors is related to life being a bit more interesting and counting being a bit more difficult?
The core concept being used here is a bit, quite literally. When you turn the switch ON, the bulb glows. Similarly, when you turn the switch OFF, the bulb goes dark. A convenient way of representing the ON and OFF states of a bulb could be by assigning numerical values.
Let 1 represent the ON state, and let 0 represent the OFF state. The digits 0 and 1 are called BITS. If there were only two colors, then White could be denoted by 1 (ON) and Black could be denoted by 0 (OFF). This is a two-bit color scheme, where the world is only Black and White.
A Word On Diodes & LEDs
Life becomes more vivid when diodes come into the picture. A diode (di + electrode) is a device that has two metallic contacts on either side of a non-metallic conductor and conducts electricity in only a single direction.
A power source connected to a diode in the conducting direction (Forward Biasing) allows the current to flow, but the same source when connected in the reverse direction to the diode (Reverse Biasing) wouldn’t produce a current (this is a simplification of an ideal diode). Thus, a diode can be thought of as a switch, which when turned ON is at 1 state (Forward) and when turned OFF is at 0 state (Reverse).
Some diodes can be engineered to emit light when a current passes through. These are called Light Emitting Diodes (LEDs). When an LED is forward-biased, it emits light (the color depends on the material it’s made of). The LED stops glowing when it’s reverse-biased.
In the decades since the 1960s, the advancement of solid state physics resulted in the development of LEDs capable of emitting Red (R), Green (G) and Blue (B) colors. This marked a significant milestone, for these three colors make up almost all the digital color displays available in the market, from your smartphone to your beloved smart-TV!
Making New Colors From Existing Ones
While painting, you must have noticed that mixing two colors generates a new color. For example, mixing blue and yellow gives green, whereas red plus white makes pink. A similar principle is also used in generating digital colors. Varying the intensity of R, G and B and mixing them up generates billions of color combinations.
Consider the following cases for a clearer understanding –
CASE 1 –
Only one LED is available. Thus, only two states are possible (ON or OFF). This is a 1-bit display.
CASE 2 –
Invest your savings and buy another LED. Now two LEDs are available, with each LED in either ON or OFF state. Total number of combinations is 22 = 4. This is a 2-bit display.
They are (ON ON); (ON OFF); (OFF OFF); (OFF ON).
Four colors are possible using two LEDs.
CASE 3 –
Suppose that someone gifted you a third LED. Then each LED could be combined with the other two in either the ON or OFF states. The total number of combinations is 23 = 8. This is a 3-bit display.
They are (ON ON ON); (ON ON OFF); (ON OFF ON); (OFF ON ON); (OFF OFF ON): (OFF ON OFF); (ON OFF OFF); (OFF OFF OFF).
Eight colors are possible using three LEDs.
Number of possible colors, N = Sn, where
(i) n = number of LEDs available.
(ii) S = number of states possible for a single LED (Either ON or OFF = 2 for conventional LEDs).
Pixel: The Atom of The Screen
A digital display screen is made up of thousands of tiny dots called pixels. A pixel is to a display screen what an atom is to an element. It is the smallest unit of the screen. An 8-bit display uses eight LEDs for each pixel (quantities in parenthesis in CASES 1 to 3), so the total number of colors possible in an 8 bit display is 28 = 256! Notice how the number of colors possible increases by an exponent of 2. The greater the number of LEDs, the more detailed the image.
Working of an 8-bit Display
Each pixel is colored by 8 LEDs, i.e., each pixel can generate any of the 28 = 256 colors. Increasing the number of pixels per square inch (display resolution) increases the picture detail (better zooming in capacity). For example, a 5 MP (Mega Pixel) has five million pixels making up the display screen. Each of those five million pixels can render any of the 256 colors in the 8-bit display.
Assume that eight LEDs are arranged color-wise from left to right. On the extreme left is R and on the extreme right is B. G falls in between. The following table shows how colors are assigned to bits. BIT Count (LED Index) is the number of LED from the left.
|BIT Count(LED Index)||0||1||2||3||4||5||6||7|
(NOTE: Color distribution can be varied according to requirements. The above is an example case.)
Another example –
|Bit Count(LED Index)||0||1||2||3||4||5||6|
Changing the ON/OFF state and intensity of each LED produces different colors. If LEDs 3, 4 and 5 are turned OFF (i.e., G LEDs are OFF) and the rest of the LEDs are ON (i.e., R and B LEDs are ON), then the color of the pixel would be Violet. The specific shade of violet will depend upon the intensity of the individual R and B LEDs.
Each of the 256 colors is assigned a numerical value from 0 to 255, with 0 representing the OFF state for all LEDs (Black) and 255 representing the ON state for all LEDs (White). The following table lists all colors in the 8-bit scheme.
Monochromatic v/s Chromatic Display
If each pixel is powered by LEDs emitting the same color, then the image would be monochromatic. If each pixel is powered by LEDs emitting different colors (R, G and B), then the display is chromatic.
True Color 24-bit displays use 8 bits each for R, G and B. Each color is called a channel. Thus, 256 shades for each channel are possible in a single pixel. Total number of colors rendered by a single pixel is 256256256 = 16,777,216. Thus, a 24-bit True Color display can render 16,777,216 different colors.
For comparison, the human eye can detect about 10 million different colors.
Basically, the next time you realize that a color is missing from your crayon set, just think back to this article and create any color that you want!
The post How Are Colors Formed Digitally Using LEDs? appeared first on Science ABC.