Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

The Type color [3/11]

Let's compare a custom azure color, stored in the variable azure, with the azure color of the marked initalizer /azure .
[Run the program]

We can see that the variable azure contains a color slightly darker then the color of the the marked initalizer /azure .

In the first statement of the source code, the variable azure was assigned a value of type color by an unmarked initializer. An unmarked initializer consists of expressions inside square brackets []. An unmarked initializer for type color contains three expressions, each specifying a value for one of the members .r, .g and .b, in that order.

Loading...