Screens and pixels

Computer screens are used to display images. These images can be dynamic like in the movies or static like pictures. You can see documents that display a combination of text and graphics. Most of the time, the images on the screen are a mixture of many things, including animations, texts, statistics, etc..

Pixels and Resolution

The screens are made of dots called pixels. Generally, the more pixels a display has, the better the resolution or clarity of the images. Normally, a screen’s resolution is stated in pixels times pixels. For example, many projectors have a resolution of 1024×768 pixels. This means it has 1024 pixels wide and 768 pixels high.

Colors

Each pixel can produce many different colors. The more colors the pixel can represent, the better the screen. The colors on the screen are expressed as a combination of three different color components: red (R), green (G) and blue (B). Any color represented on a screen can be done by mixing the RGB components in different amounts.
Each component is expressed as a number between 0 and 255 – the minimum and maximum amount respectively. For example, if the red component is 0, that means there is no red color present. Conversely, a value of 255 represents full saturation of red.
If they are 255,255,255 – the pixel produces white. If the values of R,G,B are 0,0,0 – the pixel displays black. If you gradually change the values of R,G,B equally and go from 255,255,255 to 0,0,0, you will see the color change from white to black.
The following image shows how the color of a pixel is transformed from white to black and how the values ​​of R, G, and B are related:

Coordinates

You can write programs to change one or all of the pixels of a display. To locate a single pixel on the screen, its pixel address must be found. The pixel address is shown in the form of coordinates. Each pixel has two coordinates:

  • X coordinate: The horizontal coordinate.
  • Y coordinate: The vertical coordinate

You can draw graphs, points, lines and curves using coordinates. The so-called origin of the coordinates of the computer screen is the upper left corner.