Package com.ms.fx |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class FxColor extends Color { // Constructors public FxColor(int r, int g, int b); public FxColor(int rgb); public FxColor(float r, float g, float b); // Methods public Color getDarkShadow(); public Color getLightHilight(); public Color getShadow(); public Color darkenColor(int nPercent); public Color getHilight(); public Color brightenColor(int nPercent); }
An extended color class.
public FxColor(int r, int g, int b);Creates a color with the specified red, green, and blue values in the range (0 - 255). The actual color used in rendering will depend on finding the best match given the color space available for a given output device.
Parameter Description r The red component. g The green component. b The blue component. See Also: getRed, getGreen, getBlue, getRGB
public FxColor(int rgb)Creates a color with the specified combined RGB value. The actual color used in rendering will depend on finding the best match given the color space available for a given output device.
Parameter Description rgb The combined RGB components. See Also: getRGBdefault, getRed, getGreen, getBlue, getRGB
public FxColor(float r, float g, float b);Creates a color with the specified red, green, and blue values in the range (0.0 - 1.0). The actual color used in rendering will depend on finding the best match given the color space available for a given output device.
Parameter Description r The red component. g The red component. b The red component. See Also: getRed, getGreen, getBlue, getRGB
public Color getDarkShadow();Retrieves an even darker Color than getShadow.
Return Value:
Returns a new colour which is a darkened shadow of the current color.
public Color getLightHilight();Retrieves an even brighter Color than getHilight.
Return Value:
Returns a new colour which is the light highlight of the current color.
public Color getShadow();Return a new color which is the shadow of the current color.
Return Value:
Returns a darker Color.
public Color darkenColor(int nPercent);Retrieve a new color which is a darkened version of this one.
Return Value:
Returns a Color that is nPercent darker than the current one.
Parameter Description nPercent The relative darkness for the new color.
public Color getHilight();Return a new color which is the highlight for the current color.
Return Value:
Returns a brighter Color.
public Color brightenColor(int nPercent);Retrieve a new color which is a highlighted version of this one.
Return Value:
Returns a Color that is nPercent brighter than the current one.
Parameter Description nPercent The relative brightness for the new color.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.