Methods for processing color values and generating color palettes.
public static var CATEGORY_HUES:Array
Default set of category hues.
public static function adjustBrightness(color:uint, value:Number):uint
Adjust the color brightness by a given value. From Adobe Flex.
Parameters
Returns
public static function adjustBrightness2(color:uint, value:Number):uint
Adjust the color brightness by a given value. From Adobe Flex.
Parameters
Returns
public static function alpha(color:int):int
Get the alpha component of the given color.
Parameters
Returns
public static function blue(color:int):int
Get the blue component of the given color.
Parameters
Returns
public static function brighter(color:uint):uint
Get a brighter shade of an input color.
Parameters
Returns
public static function darker(color:uint):uint
Get a darker shade of an input color.
Parameters
Returns
public static function desaturate(color:uint):uint
Get a desaturated shade of an input color.
Parameters
Returns
public static function getCategoryPalette(size:int, s1:Number, s2:Number, b:Number, a:int):Array
Returns a color palette of given size tries to provide colors
appropriate as category labels. There are 12 basic color hues
(red, orange, yellow, olive, green, cyan, blue, purple, magenta,
and pink). If the size is greater than 12, these colors will be
continually repeated, but with varying saturation levels.
Parameters
| size:int — the size of the color palette
|
| |
| s1:Number — the initial saturation to use
|
| |
| s2:Number — the final (most distant) saturation to use
|
| |
| b:Number — the brightness value to use
|
| |
| a:int — the alpha value to use
|
Returns
public static function getCoolPalette(size:int):Array
Returns a color palette that uses a "cool", blue-heavy color scheme.
Parameters
Returns
public static function getGreyScalePalette(size:int):Array
Returns a color palette of specified size that ranges from white to
black through shades of gray.
Parameters
Returns
public static function getHotPalette(size:int):Array
Returns a color palette that moves from black to red to yellow
to white.
Parameters
Returns
public static function getHSBPalette(size:int, s:Number, b:Number):Array
Returns a color palette of given size that cycles through
the hues of the HSB (Hue/Saturation/Brightness) color space.
Parameters
| size:int — the size of the color palette
|
| |
| s:Number — the saturation value to use
|
| |
| b:Number — the brightness value to use
|
Returns
| Array — the color palette
|
public static function getInterpolatedPalette(size:int, color1:uint, color2:uint):Array
Returns a color array of given size that ranges from one
given color to the other.
Parameters
| size:int |
| |
| color1:uint |
| |
| color2:uint |
Returns
public static function green(color:int):int
Get the green component of the given color.
Parameters
Returns
public static function grey(color:int):int
Get the color code for the given grayscale value.
Parameters
Returns
public static function hsb(h:Number, s:Number, b:Number):uint
Get the color code for the given hue, saturation, and brightness
values, translating from HSB color space to RGB color space.
Parameters
| h:Number |
| |
| s:Number |
| |
| b:Number |
Returns
public static function hsba(h:Number, s:Number, b:Number, a:Number):uint
Get the color code for the given hue, saturation, and brightness
values, translating from HSB color space to RGB color space.
Parameters
| h:Number |
| |
| s:Number |
| |
| b:Number |
| |
| a:Number |
Returns
public static function HSBtoRGB(h:Number, s:Number, v:Number):uint
Convert hsb color value to rgb.
Parameters
| h:Number |
| |
| s:Number |
| |
| v:Number |
Returns
public static function interpolate(color1:uint, color2:uint, t:Number):uint
Interpolate between two color values by the given mixing proportion.
Parameters
| color1:uint |
| |
| color2:uint |
| |
| t:Number |
Returns
public static function red(color:int):int
Get the red component of the given color.
Parameters
Returns
public static function rgb(r:int, g:int, b:int):uint
Get the color code for the given red, green, and blue values.
Parameters
Returns
public static function rgba(r:int, g:int, b:int, a:int = 255):uint
Get the color code for the given red, green, blue, and alpha values.
Parameters
| r:int |
| |
| g:int |
| |
| b:int |
| |
| a:int (default = 255) |
Returns
public static function rgbaFloat(r:Number, g:Number, b:Number, a:Number):uint
Get the color code for the given red, green, blue, and alpha values as
floating point numbers in the range 0-1.0.
Parameters
| r:Number |
| |
| g:Number |
| |
| b:Number |
| |
| a:Number |
Returns
public static function RGBtoHSB(r:int, g:int, b:int):Object
Convert rbg color value to hsb.
Parameters
Returns
public static function saturate(color:uint, saturation:Number):uint
Set the saturation of an input color.
Parameters
| color:uint |
| |
| saturation:Number |
Returns
public static function setAlpha(color:uint, alpha:Number):uint
Set the alpha component of the given color.
Parameters
Returns