June 2017
Beginner
1296 pages
69h 23m
English
Class Color declares methods and constants for manipulating colors in a Java program. The predeclared color constants are summarized in Fig. 27.3, and several color methods and constructors are summarized in Fig. 27.4. Two of the methods in Fig. 27.4 are Graphics methods that are specific to colors.
Color constants and their RGB values.| Color constant | RGB value |
|---|---|
public static final Color RED |
255, 0, 0 |
public static final Color GREEN |
0, 255, 0 |
public static final Color BLUE |
0, 0, 255 |
public static final Color ORANGE |
255, 200, 0 |
public static final Color PINK |
255, 175, 175 |
public static final Color CYAN |
0, 255, 255 |
public static final Color MAGENTA |
255, 0, 255 |
public static final Color YELLOW |
Read now
Unlock full access