Color Members

Color Members

Class Overview | This Package | All Packages

Fields
Name Description
black The color black.
blue The color blue.
cyan The color cyan.
darkGray The color dark gray.
gray The color gray.
green The color green.
lightGray The color light gray.
magenta The color magneta.
orange The color orange.
pink The color pink.
red The color red.
white The color white.
yellow The color yellow.

Constructors
Name Description
Color(float, float, float) Creates a color with the specified red, green, and blue values, where each of the values is in the range 0.0-1.0.
Color(int) Creates a color with the specified RGB value, where the red component is in bits 16-23 of the argument, the green component is in bits 8-15 of the argument, and the blue component is in bits 0-7.
Color(int, int, int) Creates a color with the specified red, green, and blue components.

Methods
Name Description
brighter() Creates a brighter version of this color.
darker() Creates a darker version of this color.
decode(String) Converts a string to an integer and returns the specified color.
equals(Object) Determines whether another object is equal to this color.
getBlue() Gets the blue component of this color.
getColor(String) Finds a color in the system properties.
getColor(String, Color) Finds a color in the system properties.
getColor(String, int) Finds a color in the system properties.
getGreen() Gets the green component of this color.
getHSBColor(float, float, float) Creates a Color object based on values supplied for the HSB color model.
getRed() Gets the red component of this color.
getRGB() Gets the RGB value representing the color in the default RGB ColorModel.
hashCode() Computes the hash code for this color.
HSBtoRGB(float, float, float) Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the RGB model.
RGBtoHSB(int, int, int, float[]) Converts the components of a color, as specified by the RGB model, to an equivalent set of values for hue, saturation, and brightness, the three components of the HSB model.
toString() Creates a string that represents this color and indicates the values of its RGB components.