| Method | Defined by | ||
|---|---|---|---|
|
applyAlpha(c:uint, a:Number):uint
[static]
Returns the color with altered alpha value.
| ColorMath | ||
|
calculateLitColour(col:Number, lightStrength:Number):Number
[static]
Calculate the color for a particular lighting strength.
| ColorMath | ||
|
hex2rgb(hex:Number):Object
[static]
Converts a hexadecimal color value to RGB components
| ColorMath | ||
|
hex2rgbn(hex:Number):Object
[static]
Converts hexadecimal color value to normalized rgb components ( 0 - 1 ).
| ColorMath | ||
|
rgb2hex(r:Number, g:Number, b:Number):Number
[static]
Converts color component values ( RGB ) to one hexadecimal value.
| ColorMath | ||
| applyAlpha | () | method |
public static function applyAlpha(c:uint, a:Number):uintReturns the color with altered alpha value.
Parametersc:uint — 32-bit color.
|
|
a:Number — New alpha ( 0 - 1 ).
|
uint — The hexadecimal value of the altered color.
|
| calculateLitColour | () | method |
public static function calculateLitColour(col:Number, lightStrength:Number):NumberCalculate the color for a particular lighting strength.
This converts the supplied pre-multiplied RGB color into HSL then modifies the L according to the light strength. The result is then mapped back into the RGB space.
Parameterscol:Number |
|
lightStrength:Number |
Number |
| hex2rgb | () | method |
public static function hex2rgb(hex:Number):ObjectConverts a hexadecimal color value to RGB components
Parametershex:Number — Hexadecimal color.
|
Object — The RGB color of the hexadecimal.
|
| hex2rgbn | () | method |
public static function hex2rgbn(hex:Number):ObjectConverts hexadecimal color value to normalized rgb components ( 0 - 1 ).
Parametershex:Number — hexadecimal color value.
|
Object — The normalized rgb components ( 0 - 1 ).
|
| rgb2hex | () | method |
public static function rgb2hex(r:Number, g:Number, b:Number):NumberConverts color component values ( RGB ) to one hexadecimal value.
Parametersr:Number — Red color ( 0 - 255 ).
|
|
g:Number — Green color ( 0 - 255 ).
|
|
b:Number — Blue color ( 0 - 255 ).
|
Number — The hexadecimal value of the RGB color.
|