Static class wrapping various Color utilities.
static public function hex2rgb(hex:Number):Object
Convert hexadecimal Number to rgb Object
Object - {r,g,b}
static public function hex2argb(val:Number):Object
Convert argb Object to hexidecimal Number
Object - {a,r,g,b}
static public function argb2hex(a:Number, r:Number, g:Number, b:Number):Number
Convert argb to hexadecimal.
Usage: hex=argbtohex(255,0,255,0) //outputs a 32-bit red hexadecimal value as a base-10 number
static public function rgb2hex(r:Number, g:Number, b:Number):Number
Convert rgb to hexadecimal.
Number
static public function rgbObj2hex(o:Object):Number
Convert rgb Object to hexadecimal
o | (Object) a color object {r,g,b} |
Number
static public function rgb2hexString(r:Number, g:Number, b:Number, hasPrefix:Boolean):String
Convert rgb to hexadecimal String
r | (Number) |
g | (Number) |
b | (Number) |
hasPrefix | (Boolean) add optional "0x" prefix to return |
String
static public function setColor(obj:Object, hex:Number):Void
set color of a movieclip or textfield
obj | (Object) |
hex | (Number) |
Void