Why does every smartphone screen have 16 million colors?
It doesn't matter if it's Amoled, IPS, LTPS or something else, they all have 16 million colors. Let's
talk today about pixels, colors and something else. We'll talk about dots, pixels, colors, how they are
made, why there are 16 million colors in total and briefly something cool that I think you'll like. Do
you see such a photo? I took it with my phone from my very old TV. On the photo you see dots. Don't know
what they are called, I call them dots. They are not pixels. I don't know who calls them pixels, but
they are not they are dots, dots, lights.
Let's start from 0. Where does this image come from? Any monitor (I don't know any other) nowadays uses
RGB to transmit colors. What is RGB? In reality, any screen that you watch displays only three colors.
You may see a calm purple color on the screen, but in reality the screen has only three colors more
precisely, it lights up only three colors. They are: R-Red-red, G-Green-green, B-Blue-blue. There are
many combinations of these three colors on the screen. These three colors are side by side and there are
many of them on the screen. Many! You can see these dots by getting very close to the screen. It shows
the quality of the screen BTW. The less you see them, the better the quality of the screen. They blamed
Mi A3 for that. How are the colors displayed now with this? When you are away from the screen and there
are many such dots on the screen, your eye almost combines these three dots into one, because they are
very small. Their combination creates some other color that you see. But there are so many colors, how
do you get all the rest with three colors? RGB are primary colors, by mixing them you can get almost all
the other colors. In the mix, I mean side by side placement of dots, by mixing the eye mixes them. Now
what happens: Each color has several levels of brightness. The more a color (dot) lights up, the more
you see that color. So for example: If red lights up at 100, blue at 50 and green at 20, the color you
see will be more red-shifted. You probably understood. What happens when all the colors go out except
red? You will see the ideal red color, full red. If all the dots go out except green, you will see
green. The same for blue. What happens when they all go out? What happens? There will be no color. When
does the screen have no color? When it is turned off. When it is turned off, what color is the screen?
Black. When all three dots go out, you see black color (black pixel). A pixel is a combination of these
three colors. What happens when all the colors light up at maximum intensity? You get white color. And
between the off and the fully lit, you get all the other colors in the range. How many colors? 16
million. Why 16 million? For this we need to know how many levels of intensity each color has. Each
color's intensity (how bright the color is, how much it lights up) is 256, that is, each of these three
colors can light up from 0 to 255 on the level. 0 when there is intensity, the color is off (the dot is
off). When it is 255, it lights up to the end. As a result, you get color combinations. Remember, RGB
First red, then green and then blue. Let's send a few examples to understand better: 0 0 0 What color is
it? The first number is the intensity of red color, the second is green, the third is blue. They are all
0, that is, they are all off, so this is black color. 255 255 255 They all light up to the maximum,
remember, what color was this? White. 0 0 255 Only blue lights up, so this is blue color. 255 0 0 This
is red. 0 255 0 This is green. 100 100 100 This is some intermediate color, approximately gray. We
understood this. Now, why is it 256 levels? Where does 256 come from? It is obtained that monitors
mainly use 8-bit color system. Bit? Hmm. Everything is done in bits in technology, It is the same
situation in a smartphone. A bit is 0 or 1, That is, one bit is one "cell", where the number 0 or 1 is
written. What does an 8-bit color system mean? This means that 8 bits are needed to determine the
intensity of one color, for example red. For example: 0 1 1 1 0 0 1 0 is some intensity of some color. 1
1 1 1 1 1 1 1 is the maximum, that is, 8 ones mean 255. 0 0 0 0 0 0 0 0 is 0. That is, in an 8-bit color
system, 8 bits are used to describe the intensity of one color. What is the relationship between 8 bits
and 256? We need a little math here: If 8 bits are needed to describe the intensity of one color, how
many variants of bit sequences are there? To put it simply, how many combinations of zeros and ones are
there, if the sequence is 8 digits long? Let's follow the math: What can the first digit be? 0 and 1,
that is, Two variants. The second digit is also 0 and 1 That is, again two variants. Each bit variant is
2, The quantity is 8. We are interested in how many variants there are in total. This is studied in
mathematics, in the part of probability. How do we calculate the number of variants? For this, we need
to raise the number of variants in each bit to the power of the length of the record. That is, 2 to the
power of 8. How much is 2 to the power of 8? 256. That is why there are 256 levels of intensity in an
8-bit system. As we said, each color intensity creates some new color in the sum. If we take these three
colors with some intensities, we will get some other color. We learned that one color is graded by 256
levels, That is, one color can light up in 256 ways. If one color can light up in 256 ways and we have
three colors, Wow! Wow! Wow! Now multiply 256 by 3? No! Don't do that! Let's go back to the previous
topic: One color is 8 bits, that is, to display one color, we need 8 bits (8 pieces of 0 or 1).
Therefore, the length of this record will be 8 bits. How long will all three be? 8*3=24. That is, the
full binary (binary) record of all three colors (RGB), which displays some color, consists of 24 digits
(24 bits). Now. . . If two digits are written in each cell and we have 24 cells, How many variants can
be written in a 24-digit binary record? Let's go back to the previous method: A bit can be 0 or 1, That
is, two. Two records in each cell. Total 24 cells. That is, 2 to the power of 24 in total. How much is
that? 16 777 216. What does this number tell you? Nothing? How many millions? 16. This is your 16
million colors. 17 is closer, but they say 16 and if you see on any site that instead of 16M_ the exact
number is written directly, it will be correctly 16 777 216. That is, one color has 256 variants of
lighting, Three colors have 256 to the power of 3 (the same as 2 to the power of 24) and we get 16
million. Whoever read and understood, I am sure you liked it. But I will also say this here: Imagine,
you want a faded sea foam color, but how do we display this color? When a programmer writes an
application and needs such a color, What should he do? The first option is to choose by the names of the
colors, but no one will write more than 16 million names there, right? That is why it is logical that
there are codes for colors. For example, let it be like this: 255 100 88 What is some color? (RGB color)
Similar codes have colors, however, They do not use this in practice. There is an easier way: Do we have
256 variants? What happens if we divide this number by 16? We get 16. It turned out that they use
hexadecimal notation to describe colors, because it is shorter and easier. Why? Because it describes
each color with only one two-digit number. You can fully display one specific color from 16 million with
a 6-digit number. What is the hexadecimal notation? Hexadecimal is very similar to decimal, With the
difference that: 0-9 is the same 10 is A in hexadecimal 11-B 12-C 13-D 14-E 15-F 15 or F is the maximum
value. For example: 77FFAA. To make it easy to understand, I'll tell you this: Red color: FF0000 Green
color: 00FF00 Blue color: 0000FF White: FFFFFF Black: 000000 The same principle as RGB. The first two
are red, the second two are green, the third two are blue. FF is the maximum. 00 is the minimum.
Read More