| Property | Defined by | ||
|---|---|---|---|
| desaturationMatrix : Array [static][read-only]
A color transform matrix that desaturates colors to corresponding
grayscale values.
| Colors | ||
| Method | Defined by | ||
|---|---|---|---|
|
Colors()
Constructor, throws an error if called, as this is an abstract class.
| Colors | ||
|
a(c:uint):uint
[static]
Returns the alpha component of a color value
| Colors | ||
|
b(c:uint):uint
[static]
Returns the blue component of a color value
| Colors | ||
|
brighter(c:uint, s:Number = 1):uint
[static]
Get a brighter shade of an input color.
| Colors | ||
|
darker(c:uint, s:Number = 1):uint
[static]
Get a darker shade of an input color.
| Colors | ||
|
desaturate(c:uint):uint
[static]
Get a desaturated shade of an input color.
| Colors | ||
|
g(c:uint):uint
[static]
Returns the green component of a color value
| Colors | ||
|
gray(v:uint, a:uint = 255):uint
[static]
Returns a grayscale color value with the given brightness
| Colors | ||
|
hsv(h:Number, s:Number, v:Number, a:uint = 255):uint
[static]
Returns the RGB color value for a color specified in HSV (hue,
saturation, value) color space.
| Colors | ||
|
hue(c:uint):Number
[static]
Returns the hue component of an ARGB color.
| Colors | ||
|
interpolate(c1:uint, c2:uint, f:Number):uint
[static]
Interpolate between two color values by the given mixing proportion.
| Colors | ||
|
r(c:uint):uint
[static]
Returns the red component of a color value
| Colors | ||
|
rgba(r:uint, g:uint, b:uint, a:uint = 255):uint
[static]
Returns a color value with the given red, green, blue, and alpha
components
| Colors | ||
|
saturation(c:uint):Number
[static]
Returns the saturation component of an ARGB color.
| Colors | ||
|
setAlpha(c:uint, a:uint):uint
[static]
Returns a color value by updating the alpha component of another
color value.
| Colors | ||
|
value(c:uint):Number
[static]
Returns the value (brightness) component of an ARGB color.
| Colors | ||
| desaturationMatrix | property |
desaturationMatrix:Array [read-only]
A color transform matrix that desaturates colors to corresponding
grayscale values. Can be used with the
flash.filters.ColorMatrixFilter class.
public static function get desaturationMatrix():Array
| Colors | () | constructor |
public function Colors()Constructor, throws an error if called, as this is an abstract class.
| a | () | method |
public static function a(c:uint):uintReturns the alpha component of a color value
Parametersc:uint — the color value
|
uint — the alpha component
|
| b | () | method |
public static function b(c:uint):uintReturns the blue component of a color value
Parametersc:uint — the color value
|
uint — the blue component
|
| brighter | () | method |
public static function brighter(c:uint, s:Number = 1):uintGet a brighter shade of an input color.
Parametersc:uint — a color value
|
|
s:Number (default = 1) |
uint — a brighter color value
|
| darker | () | method |
public static function darker(c:uint, s:Number = 1):uintGet a darker shade of an input color.
Parametersc:uint — a color value
|
|
s:Number (default = 1) |
uint — a darkened color value
|
| desaturate | () | method |
public static function desaturate(c:uint):uintGet a desaturated shade of an input color.
Parametersc:uint — a color value
|
uint — a desaturated color value
|
| g | () | method |
public static function g(c:uint):uintReturns the green component of a color value
Parametersc:uint — the color value
|
uint — the green component
|
| gray | () | method |
public static function gray(v:uint, a:uint = 255):uintReturns a grayscale color value with the given brightness
Parametersv:uint — the brightness component (0-255)
|
|
a:uint (default = 255) — the alpha component (0-255, 255 by default)
|
uint — the color value
|
| hsv | () | method |
public static function hsv(h:Number, s:Number, v:Number, a:uint = 255):uintReturns the RGB color value for a color specified in HSV (hue, saturation, value) color space.
Parametersh:Number — the hue, a value between 0 and 1
|
|
s:Number — the saturation, a value between 0 and 1
|
|
v:Number — the value (brighntess), a value between 0 and 1
|
|
a:uint (default = 255) — the (optional) alpha value, an integer between 0 and 255
(255 is the default)
|
uint — the corresponding RGB color value
|
| hue | () | method |
public static function hue(c:uint):NumberReturns the hue component of an ARGB color.
Parametersc:uint — the input color
|
Number — the hue component of the color is HSV color space as a
number between 0 and 1
|
| interpolate | () | method |
public static function interpolate(c1:uint, c2:uint, f:Number):uintInterpolate between two color values by the given mixing proportion. A mixing fraction of 0 will result in c1, a value of 1.0 will result in c2, and value of 0.5 will result in the color mid-way between the two in RGB color space.
Parametersc1:uint — the starting color
|
|
c2:uint — the target color
|
|
f:Number — a fraction between 0 and 1 controlling the interpolation
|
uint — the interpolated color
|
| r | () | method |
public static function r(c:uint):uintReturns the red component of a color value
Parametersc:uint — the color value
|
uint — the red component
|
| rgba | () | method |
public static function rgba(r:uint, g:uint, b:uint, a:uint = 255):uintReturns a color value with the given red, green, blue, and alpha components
Parametersr:uint — the red component (0-255)
|
|
g:uint — the green component (0-255)
|
|
b:uint — the blue component (0-255)
|
|
a:uint (default = 255) — the alpha component (0-255, 255 by default)
|
uint — the color value
|
| saturation | () | method |
public static function saturation(c:uint):NumberReturns the saturation component of an ARGB color.
Parametersc:uint — the input color
|
Number — the saturation of the color is HSV color space as a
number between 0 and 1
|
| setAlpha | () | method |
public static function setAlpha(c:uint, a:uint):uintReturns a color value by updating the alpha component of another color value.
Parametersc:uint — a color value
|
|
a:uint — the desired alpha component (0-255)
|
uint — a color value with adjusted alpha component
|
| value | () | method |
public static function value(c:uint):NumberReturns the value (brightness) component of an ARGB color.
Parametersc:uint — the input color
|
Number — the value component of the color is HSV color space as a
number between 0 and 1
|