| Package | ardisia.utils |
| Class | public class ColorUtils |
| Inheritance | ColorUtils Object |
| Property | Defined By | ||
|---|---|---|---|
| defaultChartColors : Array [static]
Default chart colors. | ColorUtils | ||
| Method | Defined By | ||
|---|---|---|---|
convertHexToUint(hex:String):uint [static]
Converts a hex string into an unsigned integer and returns the value. | ColorUtils | ||
convertRGBtoUint(r:Number, g:Number, b:Number):uint [static]
Converts a red/green/blue channel into a uint. | ColorUtils | ||
convertUintToRGB(color:uint):Array [static]
Return the red, green, and blue components of a color passed in uint
hex format. | ColorUtils | ||
getColorBetweenColors(colorA:uint, colorB:uint, ratio:Number):uint [static]
Return the uint color located at the provided ratio between the passed
colors. | ColorUtils | ||
getDefaultChartColor(index:int):uint [static]
Return the default color for a series in a chart with no colorizer
defined. | ColorUtils | ||
getGreyScaleArray(numColors:int = 210):Array [static]
Return an array of gray scale colors. | ColorUtils | ||
getWebSafeArray():Array [static]
Return a typical array of web safe colors. | ColorUtils | ||
uintToHex(num:uint):String [static]
Converts a color defined in uint to a hex value. | ColorUtils | ||
| defaultChartColors | property |
protected static var defaultChartColors:ArrayDefault chart colors.
| convertHexToUint | () | method |
public static function convertHexToUint(hex:String):uintConverts a hex string into an unsigned integer and returns the value.
Parameters
hex:String — the hex string to convert to an unsigned integer
|
uint — uint the converted value
|
| convertRGBtoUint | () | method |
public static function convertRGBtoUint(r:Number, g:Number, b:Number):uintConverts a red/green/blue channel into a uint.
Parameters
r:Number — the Number representing the red channel
| |
g:Number — the Number representing the green channel
| |
b:Number — the Number representing the blue channel
|
uint — a uint of the rgb color
|
| convertUintToRGB | () | method |
public static function convertUintToRGB(color:uint):ArrayReturn the red, green, and blue components of a color passed in uint hex format.
Parameters
color:uint — color defined as a uint
|
Array — array of [red, green, blue]
|
| getColorBetweenColors | () | method |
public static function getColorBetweenColors(colorA:uint, colorB:uint, ratio:Number):uintReturn the uint color located at the provided ratio between the passed colors. Useful for creating gradients and is utilized heavily by the Colorizer class.
Parameters
colorA:uint — the uint color at one end of the gradient
| |
colorB:uint — the uint color at the opposite end of the gradient
| |
ratio:Number — the ratio between colorA and colorB to return the
calculated color
|
uint — the uint color value
|
| getDefaultChartColor | () | method |
public static function getDefaultChartColor(index:int):uintReturn the default color for a series in a chart with no colorizer defined.
Maximum of 28 colors.
Parameters
index:int — int
|
uint |
| getGreyScaleArray | () | method |
public static function getGreyScaleArray(numColors:int = 210):ArrayReturn an array of gray scale colors.
Parameters
numColors:int (default = 210) — the number of greys to create and return
|
Array — an Array of uint color values
|
| getWebSafeArray | () | method |
public static function getWebSafeArray():ArrayReturn a typical array of web safe colors.
ReturnsArray — an Array of uint color values
|
| uintToHex | () | method |
public static function uintToHex(num:uint):StringConverts a color defined in uint to a hex value.
Note, there is no guarantee that the return string will be 6 characters long.
Parameters
num:uint — the uint to convert
|
String — a String representation of the uint
|