| Package | org.aswing |
| Class | public class ASColor |
| Subclasses | ASColorUIResource |
| Property | Defined by | ||
|---|---|---|---|
| alpha : Number | ASColor | ||
| hue : Number | ASColor | ||
| luminance : Number | ASColor | ||
| rgb : uint | ASColor | ||
| saturation : Number | ASColor | ||
| Method | Defined by | ||
|---|---|---|---|
|
ASColor(rgb:uint = 0x000000, alpha:Number = 1)
Create a ASColor
| ASColor | ||
|
Creates a new
ASColor that is a brighter version of this
ASColor. | ASColor | ||
|
changeAlpha(newAlpha:Number):ASColor
Create a new
ASColor with another alpha but same rgb. | ASColor | ||
|
Create a new
ASColor with just change hue channel value. | ASColor | ||
|
changeLuminance(newLuminance:Number):ASColor
Create a new
ASColor with just change luminance channel value. | ASColor | ||
|
changeSaturation(newSaturation:Number):ASColor
Create a new
ASColor with just change saturation channel value. | ASColor | ||
|
Creates a new
ASColor that is a darker version of this
ASColor. | ASColor | ||
|
equals(o:Object):Boolean
Compare if compareTo object has the same value as this ASColor object does
| ASColor | ||
|
getAlpha():Number
Returns the alpha component in the range 0-1.
| ASColor | ||
|
getARGB():uint
Returns the ARGB value representing the color.
| ASColor | ||
|
getASColor(r:uint, g:uint, b:uint, a:Number = 1):ASColor
[static]
Returns a ASColor with the specified red, green, blue values in the range [0 - 255]
and alpha value in range[0, 1].
| ASColor | ||
|
getASColorWithHLS(h:Number, l:Number, s:Number, a:Number = 1):ASColor
[static]
Returns a ASColor with with the specified hue, luminance,
saturation and alpha values in the range [0 - 1].
| ASColor | ||
|
getBlue():uint
Returns the blue component in the range 0-255.
| ASColor | ||
|
getGreen():uint
Returns the green component in the range 0-255.
| ASColor | ||
|
getHue():Number
Returns the hue component in the range [0, 1].
| ASColor | ||
|
getLuminance():Number
Returns the luminance component in the range [0, 1].
| ASColor | ||
|
getRed():uint
Returns the red component in the range 0-255.
| ASColor | ||
|
getRGB():uint
Returns the RGB value representing the color.
| ASColor | ||
|
getRGBWith(rr:uint, gg:uint, bb:uint):uint
[static]
Returns the RGB value representing the red, green, and blue values.
| ASColor | ||
|
getSaturation():Number
Returns the saturation component in the range [0, 1].
| ASColor | ||
|
getWithARGB(argb:uint):ASColor
[static]
Returns a ASColor with specified ARGB uint value.
| ASColor | ||
|
toString():String
| ASColor | ||
| Constant | Defined by | ||
|---|---|---|---|
| BLACK : ASColor
[static]
| ASColor | ||
| BLUE : ASColor
[static]
| ASColor | ||
| CYAN : ASColor
[static]
| ASColor | ||
| DARK_GRAY : ASColor
[static]
| ASColor | ||
| GRAY : ASColor
[static]
| ASColor | ||
| GREEN : ASColor
[static]
| ASColor | ||
| HALO_BLUE : ASColor
[static]
| ASColor | ||
| HALO_GREEN : ASColor
[static]
| ASColor | ||
| HALO_ORANGE : ASColor
[static]
| ASColor | ||
| LIGHT_GRAY : ASColor
[static]
| ASColor | ||
| MAGENTA : ASColor
[static]
| ASColor | ||
| ORANGE : ASColor
[static]
| ASColor | ||
| PINK : ASColor
[static]
| ASColor | ||
| RED : ASColor
[static]
| ASColor | ||
| WHITE : ASColor
[static]
| ASColor | ||
| YELLOW : ASColor
[static]
| ASColor | ||
| alpha | property |
protected var alpha:Number
| hue | property |
protected var hue:Number
| luminance | property |
protected var luminance:Number
| rgb | property |
protected var rgb:uint
| saturation | property |
protected var saturation:Number
| ASColor | () | constructor |
public function ASColor(rgb:uint = 0x000000, alpha:Number = 1)Create a ASColor
Parametersrgb:uint (default = 0x000000) |
|
alpha:Number (default = 1) |
| brighter | () | method |
public function brighter(factor:Number = 0.7):ASColor
Creates a new ASColor that is a brighter version of this
ASColor.
factor:Number (default = 0.7) — the birghter factor 0 to 1, default is 0.7
|
ASColor —
a new ASColor object that is
a brighter version of this ASColor.
|
See also
| changeAlpha | () | method |
public function changeAlpha(newAlpha:Number):ASColor
Create a new ASColor with another alpha but same rgb.
newAlpha:Number — the new alpha
|
ASColor —
the new ASColor
|
| changeHue | () | method |
public function changeHue(newHue:Number):ASColor
Create a new ASColor with just change hue channel value.
newHue:Number — the new hue value
|
ASColor —
the new ASColor
|
| changeLuminance | () | method |
public function changeLuminance(newLuminance:Number):ASColor
Create a new ASColor with just change luminance channel value.
newLuminance:Number — the new luminance value
|
ASColor —
the new ASColor
|
| changeSaturation | () | method |
public function changeSaturation(newSaturation:Number):ASColor
Create a new ASColor with just change saturation channel value.
newSaturation:Number — the new saturation value
|
ASColor —
the new ASColor
|
| darker | () | method |
public function darker(factor:Number = 0.7):ASColor
Creates a new ASColor that is a darker version of this
ASColor.
factor:Number (default = 0.7) — the darker factor(0, 1), default is 0.7
|
ASColor —
a new ASColor object that is
a darker version of this ASColor.
|
See also
| equals | () | method |
public function equals(o:Object):BooleanCompare if compareTo object has the same value as this ASColor object does
Parameterso:Object — the object to compare with
|
Boolean — a Boolean value that indicates if the compareTo object's value is the same as this one
|
| getAlpha | () | method |
public function getAlpha():NumberReturns the alpha component in the range 0-1.
ReturnsNumber |
| getARGB | () | method |
public function getARGB():uintReturns the ARGB value representing the color.
Returnsuint |
| getASColor | () | method |
public static function getASColor(r:uint, g:uint, b:uint, a:Number = 1):ASColorReturns a ASColor with the specified red, green, blue values in the range [0 - 255] and alpha value in range[0, 1].
Parametersr:uint — red channel
|
|
g:uint — green channel
|
|
b:uint — blue channel
|
|
a:Number (default = 1) — alpha channel
|
ASColor |
| getASColorWithHLS | () | method |
public static function getASColorWithHLS(h:Number, l:Number, s:Number, a:Number = 1):ASColorReturns a ASColor with with the specified hue, luminance, saturation and alpha values in the range [0 - 1].
Parametersh:Number — hue channel
|
|
l:Number — luminance channel
|
|
s:Number — saturation channel
|
|
a:Number (default = 1) — alpha channel
|
ASColor |
| getBlue | () | method |
public function getBlue():uintReturns the blue component in the range 0-255.
Returnsuint — the blue component.
|
| getGreen | () | method |
public function getGreen():uintReturns the green component in the range 0-255.
Returnsuint — the green component.
|
| getHue | () | method |
public function getHue():NumberReturns the hue component in the range [0, 1].
ReturnsNumber — the hue component.
|
| getLuminance | () | method |
public function getLuminance():NumberReturns the luminance component in the range [0, 1].
ReturnsNumber — the luminance component.
|
| getRed | () | method |
public function getRed():uintReturns the red component in the range 0-255.
Returnsuint — the red component.
|
| getRGB | () | method |
public function getRGB():uintReturns the RGB value representing the color.
Returnsuint |
| getRGBWith | () | method |
public static function getRGBWith(rr:uint, gg:uint, bb:uint):uintReturns the RGB value representing the red, green, and blue values.
Parametersrr:uint — red channel
|
|
gg:uint — green channel
|
|
bb:uint — blue channel
|
uint |
| getSaturation | () | method |
public function getSaturation():NumberReturns the saturation component in the range [0, 1].
ReturnsNumber — the saturation component.
|
| getWithARGB | () | method |
public static function getWithARGB(argb:uint):ASColorReturns a ASColor with specified ARGB uint value.
Parametersargb:uint — ARGB value representing the color
|
ASColor —
the ASColor
|
| toString | () | method |
public function toString():String
Returns
String |
| BLACK | constant |
public static const BLACK:ASColor
| BLUE | constant |
public static const BLUE:ASColor
| CYAN | constant |
public static const CYAN:ASColor
| DARK_GRAY | constant |
public static const DARK_GRAY:ASColor
| GRAY | constant |
public static const GRAY:ASColor
| GREEN | constant |
public static const GREEN:ASColor
| HALO_BLUE | constant |
public static const HALO_BLUE:ASColor
| HALO_GREEN | constant |
public static const HALO_GREEN:ASColor
| HALO_ORANGE | constant |
public static const HALO_ORANGE:ASColor
| LIGHT_GRAY | constant |
public static const LIGHT_GRAY:ASColor
| MAGENTA | constant |
public static const MAGENTA:ASColor
| ORANGE | constant |
public static const ORANGE:ASColor
| PINK | constant |
public static const PINK:ASColor
| RED | constant |
public static const RED:ASColor
| WHITE | constant |
public static const WHITE:ASColor
| YELLOW | constant |
public static const YELLOW:ASColor