Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

The Type color [2/11]

Each variable of type color has three members: .r, .g and .b.

The members represent the three separate primary color components of your display device: .r for red , .g for green , and .b for blue .

In this example, the chosen intensities of red, green and blue components are such that their mix produces the azure color.

The members .r, .g and .b must be in the range 0–100.

After executing the program, try changing the values of members .r, .g and .b to get some other colors.

Loading...