The RGB Color Code Model (Part 1)

header-lesson-04

The RGB Color Code Model (Part 1)#

Color Models

What is the RGB Color Code Model?#

The RGB color code model is a way to create colors on screens and LEDs using three primary colors: red, green, and blue (R, G, B). Each color is given a value from 0 to 255. By combining these values, you can make any color. For example, if you want pure red, you use (255, 0, 0), which means full red, no green, and no blue. To get green, you use (0, 255, 0); for blue, you use (0, 0, 255). By adjusting these values, you can mix different amounts of red, green, and blue to create other colors. With 256 color combinations for each color in the RGB color model, there are 256³ or 16,777,216 possible color combinations.

We will use the RGB values of 0 to 255 to create red, green, and blue with an RGB LED as in the chart displayed below:

rgb-color-code-chart-01