Pixels

There once was a discussion on the Wealthy Boomer about pixels and I thought it'd be interesting to talk about them so that ...

>Huh? Pixels?
A pixel is a coloured dot which can be any of a jillion colours.
Images (and everything else on your screen) is made up of these dots.
The most common computer screen now seems to be 1024 x 768 pixels, meaning there are 1024 coloured dots across and 768 down ... and they fill the entire screen.
 For example, this rectangle is 512 pixels wide.
If your screen is 1024 x 768 then the rectangle should be half the width of your screen.
If your screen is 800 x 600 then it will cover roughly 2/3 of your screen.

>I make it 512/800 = 0.64 and that's just 64%.
Yes. In any case, you can check your screen size by clicking here
 Further, the most common arrangements of pixels seems to be the Dot Trio, as in Figure 1. >So which ones are the coloured dots that ... uh, make up the 1024 ... uh ... Yes, it's strange, eh? Each "dot" is actually three dots. That's the Dot Trio: Red, Green and Blue, or RGB for short. Figure 1
For example, if you have a 15 inch screen and the screen resolution is 1024 Dot Trios wide (as with a 1024x768 screen resolution), each Trio is 15/1024 = 0.0146 inches wide or 0.37 mm. But you'll notice that the base of the Trio is only two dots wide (plus some black space, as in Figure 1) so the Trio would be about 2/3 (0.37) or about 0.25 mm ... and that's typical of the dot pitch on a computer monitor.

Your computer might devote a byte (consisting of 8 bits, either 1 or 0) to each of R, G and B (hence 3 bytes per pixel).
These eight bits can run from 00000000 to 11111111 (from 0 to 255, in decimal) which makes 256 possibilities ... that's 28
Hence each colour has 256 intensities and a Trio has 256x256x256 = 16,777,216 possible combinations ... that's 224
For a 1024x768 pixel monitor, it'd take (1024*768 pixels)*(3 bytes per pixel) or about 2.3 megabytes to hold the image on the screen.

>Yeah! I got e-mail once with a HUGE picture attached and it was THAT big!
Yes.
Now each combination of coloured dots gives some colour with all 0's giving black and all 1s giving white (like the background to this webpage).

>Huh?
 Let's make up our own dot trio ... like Figure 2, but with much smaller pixels. Figure 2
Something like this     which has all colours at maximum intensity R = G = B = 255 (or 11111111, in binary).

>That's coloured?
Well ... it's like Figure 2, but much smaller dots.Look very closely and you'll see the three colours. (If you look very closely at your TV screen you'll also see the same three colours.) If I could make even smaller dots it'd look white. Now, it's looks sort of grey.
Besides, if I made the dots so small that 1024 pixels fit across the screen then I could get the background for this page
... and that's white, eh?

Now watch what happens when we eliminate the red (setting the red byte to 0):       which is this but with smaller dots

Instead, if we eliminate the green (setting the green byte to 0):       which is this but with smaller dots

... and if we eliminate the blue (setting the blue byte to 0):       which is this but with smaller dots
We can also change the intensity of each colour (R, G or B) since we have 256 to choose from.
But now I'll use the actual pixels on the screen.
You'll notice that if the three colours have the same intensities we get shades of grey.
(The light grey about the edge of this webpage has R=G=B=208.)

>And what am I?
Do you really want to know?
Just kidding. Your colour is R+G+B = 0+0+112.

>How do you get brown?
Some Red and a bit o' Green: R+G+B = 150+50+0 =

>How do you get ...?
I think that's enough.

 R+G+B = 255+128+0 R+G+B = 255+255+0 R+G+B = 128+255+255 R+G+B = 128+128+255 R+G+B = 208+208+208