What does RGB stand for?

RGB stands for Red Green Blue and is a color model. The model gets its name from the three colors. Each of the three colors are represented as an 8-bit number. Together, the values make a 24-bit integer. RGB is primarily used for color display in electronic equipment like TV’s, computers, etc. This is achieved through color management software for each individual device.

How does it work?

Basically, red, green and blue light are mixed together in varying intensities to form a color. The system uses a color range of 0 to 255 (8-bit) for each of the three colors which will form the intended color representation through the color management software.

To make a color with RGB, a red light beam, green light beam and blue light beam are superimposed at predetermined intensities. For black, the light is emitted from the unit and for white, it is reflected.

Why Red, Green and Blue?

These primary colors were chosen because of the physiology of our human eyes. Essentially, the cones in our eyes react well to these three colors as well as the many shades of mixing those colors.

How is it used in web development?

In modern web development, we have access to 16.8 million colors. That is surely more colors than you will ever use but helps when looking for the perfect shade. The main reason most developers use RGB is one of preference. Personally, I like the RGB syntax in choosing colors because of its ease of use when trying to pick the perfect color. Using Hex color is much tougher to handle when trying to pick the perfect shade because it involves number and letters. Both are popular among developers.

A bonus for choosing RGB is the option of using RGBa. This model is used like the plain RGB model but adds an alpha value that is between 0 and 1. After the three values for red, green and blue are entered, an alpha value is chosen to change transparency of the color. For example, entering a 0.5 will cause the color value to be 50% transparent.

Overall, choosing to use RGB as your color model of choice is a personal one. Although, if you work on a team, the choice may already be made for you. If the choice is yours, I recommend experimenting with both of the models to get a feel for which one suits your style. If you can’t decide, then try another like HSLa (similar to RGBa). Good luck!