Example usage for Java java.awt Color fields, constructors, methods, implement or subclass
The text is from its open source code.
Color | WHITE The color white. |
Color | lightGray The color light gray. |
Color | LIGHT_GRAY The color light gray. |
Color | gray The color gray. |
Color | darkGray The color dark gray. |
Color | DARK_GRAY The color dark gray. |
Color | BLACK The color black. |
Color | RED The color red. |
Color | PINK The color pink. |
Color | orange The color orange. |
Color | YELLOW The color yellow. |
Color | green The color green. |
Color | magenta The color magenta. |
Color | cyan The color cyan. |
Color | blue The color blue. |
Color(int r, int g, int b) Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255). | |
Color(float r, float g, float b) Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0). | |
Color(ColorSpace cspace, float[] components, float alpha) Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha. | |
Color(int rgba, boolean hasalpha) Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. | |
Color(int rgb) Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. | |
Color(int r, int g, int b, int a) Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255). | |
Color(float r, float g, float b, float a) Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0). |
Color | brighter() Creates a new Color that is a brighter version of this Color . |
Color | darker() Creates a new Color that is a darker version of this Color . |
Color | decode(String nm) Converts a String to an integer and returns the specified opaque Color . |
boolean | equals(Object obj) Determines whether another object is equal to this Color . |
int | getAlpha() Returns the alpha component in the range 0-255. |
int | getBlue() Returns the blue component in the range 0-255 in the default sRGB space. |
Class> | getClass() Returns the runtime class of this Object . |
Color | getColor(String nm, Color v) Finds a color in the system properties. |
Color | getColor(String nm, int v) Finds a color in the system properties. |
Color | getColor(String nm) Finds a color in the system properties. |
float[] | getColorComponents(float[] compArray) Returns a float array containing only the color components of the Color , in the ColorSpace of the Color . |
float[] | getColorComponents(ColorSpace cspace, float[] compArray) Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter. |
ColorSpace | getColorSpace() Returns the ColorSpace of this Color . |
float[] | getComponents(float[] compArray) Returns a float array containing the color and alpha components of the Color , in the ColorSpace of the Color . |
float[] | getComponents(ColorSpace cspace, float[] compArray) Returns a float array containing the color and alpha components of the Color , in the ColorSpace specified by the cspace parameter. |
int | getGreen() Returns the green component in the range 0-255 in the default sRGB space. |
Color | getHSBColor(float h, float s, float b) Creates a Color object based on the specified values for the HSB color model. |
int | getRed() Returns the red component in the range 0-255 in the default sRGB space. |
int | getRGB() Returns the RGB value representing the color in the default sRGB ColorModel . |
float[] | getRGBColorComponents(float[] compArray) Returns a float array containing only the color components of the Color , in the default sRGB color space. |
float[] | getRGBComponents(float[] compArray) Returns a float array containing the color and alpha components of the Color , as represented in the default sRGB color space. |
int | getTransparency() Returns the transparency mode for this Color . |
int | hashCode() Computes the hash code for this Color . |
int | HSBtoRGB(float hue, float saturation, float brightness) Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model. |
float[] | RGBtoHSB(int r, int g, int b, float[] hsbvals) Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model. |
String | toString() Returns a string representation of this Color . |