| Package | com.whirled.contrib |
| Class | public class ColorConversion |
The methods for changing the colors of Movie Clips change the entire Movie clip to that color, it is not a tint. This is useful for Movie Clips that have re-colorable childs to easily change their color. Examples include balloons, game tokens and furniture items.
Author: jdnx429| Method | Defined by | ||
|---|---|---|---|
|
changeColorCMY(mc:MovieClip, CMY:Array):void
[static]
Changes the color of a Movie Clip using the CMY color model
| ColorConversion | ||
|
changeColorHSB(mc:MovieClip, HSB:Array):void
[static]
Changes the color of a Movie Clip using the HSB color model
| ColorConversion | ||
|
changeColorRGB(mc:MovieClip, RGB:Array):void
[static]
Changes the color of a Movie Clip using the RGB color model
| ColorConversion | ||
|
CMYtoHSB(cyan:Number, magenta:Number, yellow:Number):Array
[static]
Converts a color from the CMY color model to HSB.
| ColorConversion | ||
|
CMYtoRGB(cyan:Number, magenta:Number, yellow:Number):Array
[static]
Converts a color from the CMY color model to RGB.
| ColorConversion | ||
|
compareColorsCMY(cmy1:Array, cmy2:Array):Number
[static]
Returns the color difference between two colors as defined by
CIEDE2000.
| ColorConversion | ||
|
compareColorsRGB(rgb1:Array, rgb2:Array):Number
[static]
Returns the color difference between two colors as defined by
CIEDE2000.
| ColorConversion | ||
|
HSBtoCMY(hue:Number, sat:Number, bri:Number):Array
[static]
Converts a color from the HSB color model to CMY.
| ColorConversion | ||
|
HSBtoRGB(hue:Number, sat:Number, bri:Number):Array
[static]
Converts a color from the HSB color model to RGB.
| ColorConversion | ||
|
RGBtoCMY(r:Number, g:Number, b:Number):Array
[static]
Converts a color from the RGB color model to CMY.
| ColorConversion | ||
|
RGBtoHSB(r:Number, g:Number, b:Number):Array
[static]
Converts a color from the RGB color model to HSB.
| ColorConversion | ||
| Method | Defined by | ||
|---|---|---|---|
|
calcColorDiff(currColor:Array, goalColor:Array):Number
[static]
| ColorConversion | ||
|
CMYtoLCHab(cmyArray:Array):Array
[static]
| ColorConversion | ||
|
HSBtoRGBMultAlpha(hue:Number, sat:Number, bri:Number):Array
[static]
| ColorConversion | ||
| calcColorDiff | () | method |
protected static function calcColorDiff(currColor:Array, goalColor:Array):NumberParameters
currColor:Array |
|
goalColor:Array |
Number |
| changeColorCMY | () | method |
public static function changeColorCMY(mc:MovieClip, CMY:Array):voidChanges the color of a Movie Clip using the CMY color model
Parametersmc:MovieClip — the Movie Clip that is to be colored.
|
|
CMY:Array — an Array in the format of [cyan, magenta, yellow].
The range for each should be 0.0-1.0
|
| changeColorHSB | () | method |
public static function changeColorHSB(mc:MovieClip, HSB:Array):voidChanges the color of a Movie Clip using the HSB color model
Parametersmc:MovieClip — the Movie Clip that is to be colored..
|
|
HSB:Array — an Array in the format of [hue, saturation, brightness].
The range for hue is 0-360. The range for saturation and brightness is 0.0-1.0
|
| changeColorRGB | () | method |
public static function changeColorRGB(mc:MovieClip, RGB:Array):voidChanges the color of a Movie Clip using the RGB color model
Parametersmc:MovieClip — the Movie Clip that is to be colored.
|
|
RGB:Array — an Array in the format of [red, green, blue]. The range for each should be
0-255.
|
| CMYtoHSB | () | method |
public static function CMYtoHSB(cyan:Number, magenta:Number, yellow:Number):ArrayConverts a color from the CMY color model to HSB. The values for cyan, magenta, and yellow should be supplied in the range of 0.0 to 1.0.
Parameterscyan:Number — the cyan value.
|
|
magenta:Number — the magenta value.
|
|
yellow:Number — the yellow value
|
Array — an Array in the format [hue, saturation, brightness]. The range for hue is
0-360. The range for saturation and brightness is 0.0-1.0
|
| CMYtoLCHab | () | method |
protected static function CMYtoLCHab(cmyArray:Array):ArrayParameters
cmyArray:Array |
Array |
| CMYtoRGB | () | method |
public static function CMYtoRGB(cyan:Number, magenta:Number, yellow:Number):ArrayConverts a color from the CMY color model to RGB. The values for the arguments should be in the range of 0.0-1.0.
Parameterscyan:Number |
|
magenta:Number |
|
yellow:Number |
Array — an Array in the format [red, green, blue]. The range for all is 0-255.
|
| compareColorsCMY | () | method |
public static function compareColorsCMY(cmy1:Array, cmy2:Array):NumberReturns the color difference between two colors as defined by CIEDE2000. The maximum color difference, that between black and white is 100.
The range of the arguments should be 0.0 to 1.0
Parameterscmy1:Array — the first color to be compared in the format of [cyan, magenta, yellow]
|
|
cmy2:Array — the second color to be compared in the format of [cyan, magenta, yellow]
|
Number — the difference between two colors, in the range of 0-100.
|
| compareColorsRGB | () | method |
public static function compareColorsRGB(rgb1:Array, rgb2:Array):NumberReturns the color difference between two colors as defined by CIEDE2000. The maximum color difference, that between black and white is 100.
The range of the arguments should be 0 to 255
Parametersrgb1:Array — the first color to be compared in the format of [red, green, blue]
|
|
rgb2:Array — the second color to be compared in the format of [red, green, blue]
|
Number — the difference between two colors, in the range of 0-100.
|
| HSBtoCMY | () | method |
public static function HSBtoCMY(hue:Number, sat:Number, bri:Number):ArrayConverts a color from the HSB color model to CMY. The value for hue should be in the range of 0-360. Sat and bri should be in the range of 0.0 to 1.0
Parametershue:Number — the hue of the color.
|
|
sat:Number — the saturation value.
|
|
bri:Number — the brightness value.
|
Array — an Array in the format [cyan, magenta, yellow]. The range for all is 0.0 to 1.0
|
| HSBtoRGB | () | method |
public static function HSBtoRGB(hue:Number, sat:Number, bri:Number):ArrayConverts a color from the HSB color model to RGB. The value for hue should be in the range of 0-360. Sat and bri should be in the range of 0.0 to 1.0
Parametershue:Number — the hue of the color.
|
|
sat:Number — the saturation value.
|
|
bri:Number — the brightness value.
|
Array — an Array in the format [red, green, blue]. The range for all is 0-255.
|
| HSBtoRGBMultAlpha | () | method |
protected static function HSBtoRGBMultAlpha(hue:Number, sat:Number, bri:Number):ArrayParameters
hue:Number |
|
sat:Number |
|
bri:Number |
Array |
| RGBtoCMY | () | method |
public static function RGBtoCMY(r:Number, g:Number, b:Number):ArrayConverts a color from the RGB color model to CMY. The values for the arguments should be in the range of 0-255.
Parametersr:Number — the red value.
|
|
g:Number — the green value.
|
|
b:Number — the blue value.
|
Array — an Array in the format [cyan, magenta, yellow]. The range for all is 0-1.
|
| RGBtoHSB | () | method |
public static function RGBtoHSB(r:Number, g:Number, b:Number):ArrayConverts a color from the RGB color model to HSB. The values for the arguments should be supplied in the range of 0 to 255.
Parametersr:Number — the red value.
|
|
g:Number — the green value.
|
|
b:Number — the blue value
|
Array — an Array in the format [hue, saturation, brightness]. The range for hue is 0-360.
The range for saturation and brightness is 0.0-1.0
|