ColorNameColor
DescriptionThe Color class represents a specific color to the system. Class Definition
public final class java.awt.Color extends java.lang.Object implements java.io.Serializable { // Constants public static final Color black; public static final Color blue; public static final Color cyan; public static final Color darkGray; public static final Color gray; public static final Color green; public static final Color lightGray; public static final Color magenta; public static final Color orange; public static final Color pink; public static final Color red; public static final Color white; public static final Color yellow; // Constructors public Color (int rgb); public Color (int red, int green, int blue); public Color (float red, float green, float blue); // Class Methods public static Color decode (String name); public static Color getColor (String name); public static Color getColor (String name, Color defaultColor); public static Color getColor (String name, int defaultColor); public static Color getHSBColor (float hue, float saturation, float brightness); public static int HSBtoRGB (float hue, float saturation, float brightness); public static float[] RGBtoHSB (int red, int green, int blue, float hsbvalues[]); // Instance Methods public Color brighter(); public Color darker(); public boolean equals (Object object); public int getBlue(); public int getGreen(); public int getRed(); public int getRGB(); public int hashCode(); public String toString(); } Constantsblackpublic static final Color blackThe color black. bluepublic static final Color blueThe color blue. cyanpublic static final Color cyanThe color cyan. darkGraypublic static final Color darkGrayThe color dark gray. graypublic static final Color grayThe color gray. greenpublic static final Color greenThe color green. lightGraypublic static final Color lightGrayThe color light gray. magentapublic static final Color magentaThe color magenta. orangepublic static final Color orangeThe color orange. pinkpublic static final Color pinkThe color pink. redpublic static final Color redThe color red. whitepublic static final Color whiteThe color white. yellowpublic static final Color yellowThe color yellow. ConstructorsColorpublic Color (int rgb)
public Color (int red, int green, int blue)
public Color (float red, float green, float blue)
Class Methodsdecodepublic static Color decode (String nm)
getColorpublic static Color getColor (String name)
public static Color getColor (String name, Color defaultColor)
public static Color getColor (String name, int defaultColor)
getHSBColorpublic static Color getHSBColor (float hue, float saturation, float brightness)
HSBtoRGBpublic static int HSBtoRGB (float hue, float saturation, float brightness)
RGBtoHSBpublic static float[] RGBtoHSB (int red, int green, int blue, float[] hsbvalues)
Instance Methodsbrighterpublic Color brighter()
darkerpublic Color darker()
equalspublic boolean equals (Object object)
getBluepublic int getBlue()
getGreenpublic int getGreen()
getRedpublic int getRed()
getRGBpublic int getRGB()
hashCodepublic int hashCode()
toStringpublic String toString()
See AlsoObject, Properties, Serializable, String |
|