Color
To present color values, Color uses the RGB color model that represent the intensity of the red, green, and blue components of the color. Other color values are obtained by mixing red, green, and blue components. That is, the data-type values of Color are three integer values.
// The Color data type has a constructor that
// takes three integer arguments.
Color bookBlue = new Color(9, 90, 166);
System.out.printf("Green component %d", bookBlue.getGreen());
The API for Color contains several constructors and methods; three of the methods enables the programmer to retrieve the Color components intensity separately (see far right).