public class Color
implements IConstructable
Describes a color in an object. The color can be described by an RGB (red, green, blue) triplet, or it can be a system color constant, such as the color of a command button [Color.CONTROL] To determine the appearance of Color constants with which you are unfamiliar (for example, Color.CONTROLDARKDARK), display a form, and select the color as the background color of the form.
Fields
Name | Description |
---|---|
ACTIVEBORDER | The color for active borders. |
ACTIVECAPTION | The color for active captions. |
ACTIVECAPTIONTEXT | The color for active caption text. |
APPWORKSPACE | The color of the application workspace. |
BLACK | The color black. |
BLUE | The color blue. |
CONTROL | The color for controls. |
CONTROLDARK | Topic controldark color. |
CONTROLDARKDARK | The controldarkdark color. |
CONTROLLIGHT | The controllight color. |
CONTROLLIGHTLIGHT | The controllightlight color. |
CONTROLTEXT | The color for control text. |
DARKGRAY | The color dark gray. |
DESKTOP | The desktop color. |
GRAY | The color gray. |
GRAYTEXT | The color for gray text. |
GREEN | The color green. |
HIGHLIGHT | The color for highlighted objects. |
HIGHLIGHTTEXT | The color for highlighted text. |
HOTTRACK | The hottrack color. |
INACTIVEBORDER | The color for inactive borders. |
INACTIVECAPTION | The color for inactive captions. |
INACTIVECAPTIONTEXT | The color for inactive caption text. |
INFO | The Info color. |
INFOTEXT | The InfoText color. |
LIGHTGRAY | The color light gray. |
MENU | The color for menus. |
MENUTEXT | The color for menu text. |
RED | The color red. |
SCROLLBAR | The color for scroll bars. |
WHITE | The color white. |
WINDOW | The color for windows. |
WINDOWFRAME | The color for window frames. |
WINDOWTEXT | The color for window text. |
Constructors
Name | Description |
---|---|
Color(int value) | Creates a new Color object based on a full RGB triplet or system color value in an integer. |
Color(int r, int g, int b) | Creates a new Color object given individual red, green, and blue (RGB) values. |
Methods
Name | Description |
---|---|
equals(Object obj) | Compares this color object to the color represented in the object you specify. |
getBlue() | Retrieves the blue component of the color, even if the color is a system color. |
getConstructorArgs() | Used by code generation at design time. |
getGreen() | Retrieves the green component of the color, even if the color is a system color. |
getRed() | Retrieves the red component of the color. |
getRGB() | Retrieves the entire RGB triplet for the color, even if the color is a system color. |
getValue() | Retrieves the current value of this Color object. |
hashCode() | Retrieves a hash code for this object for use with various sorting and hashtable objects. |
toString() | Retrieves a string description of the Color object. |
Creates a new Color object based on a full RGB triplet or system color value in an integer.
Creates a new Color object given individual red, green, and blue (RGB) values.
Returns true if the colors are the same; otherwise, returns false.
Compares this color object to the color represented in the object you specify. If the object you specify is not a Color object, or the colors do not match, returns false.
Returns int the blue component of the color.
Retrieves the blue component of the color, even if the color is a system color.
Returns the permissible constructor arguments.
Used by code generation at design time. For more information, see
Returns the green component of the color.
Retrieves the green component of the color, even if the color is a system color.
Returns the red component of the color, even if the color is a system color.
Retrieves the red component of the color.
Returns the RGB triplet value.
Retrieves the entire RGB triplet for the color, even if the color is a system color.
Returns int the value of the Color object.
Retrieves the current value of this Color object. If this Color object is a system color, the high byte of the returned value will not be zero.
Returns a hashcode for this object.
Retrieves a hash code for this object for use with various sorting and hashtable objects.
Returns a string describing the Color object.
Retrieves a string description of the Color object.