A helper utility class for color conversion.
public static function decColorToHex(color:Number):String
Converts a decimal color to a hex value.
Parameters
Returns
public static function hexToRgb(hex:Number):Object
Converts a HEX color value to an RGB value object.
Parameters
Returns
public static function parseColorNotation(color:uint):uint
Take a short color notation and convert it to a full color.
Repeats each value once so that #FB0 expands to #FFBB00
Parameters
Returns
public static function resolveColor(value:Object, none:uint = 0):uintParameters
| value:Object |
| |
| none:uint (default = 0) |
Returns
public static function resolveColorFromCMYK(value:String):uint
Allows an comma-separated list of 4 numerical
values that represent cmyk and are then converted to
a decimal color value.
Parameters
Returns
public static function resolveColorFromKey(value:String, none:uint = 0):uint
Converts Color Keys to color values. If the specified color key is not
supported then black is used.
Parameters
| value:String |
| |
| none:uint (default = 0) |
Returns
public static function resolveColorFromRGB(value:String):Number
Converts an RGB numeric comma separated list
to a decimal color value. Expected order R,G,B.
Parameters
Returns
public static function resolveColorFromRGBPercent(value:String):uint
Allows an comma-separated list of three numerical or
percent values that are then converted to a hex value.
Parameters
Returns