Package | blitting.model |
Class | public class Color |
Inheritance | Color ![]() |
Implements | IInitializable |
Property | Defined By | ||
---|---|---|---|
alpha : uint [read-only]
Get unsigned int of 8-bit alpha. | Color | ||
argb : uint [read-only]
Get 32-bit unsigned int of 8-bit alpha, red, green, blue. | Color | ||
blue : uint [read-only]
Get unsigned int of 8-bit blue. | Color | ||
green : uint [read-only]
Get unsigned int of 8-bit green. | Color | ||
red : uint [read-only]
Get unsigned int of 8-bit red. | Color | ||
rgb : uint [read-only]
Get 24-bit unsigned int of 8-bit red, green, and blue
| Color | ||
rgba : uint [read-only]
Get 32-bit unsigned int of 8-bit red, green, blue, alpha. | Color |
Property | Defined By | ||
---|---|---|---|
color : uint
32-bit ARGB color
8-bit alpha (0x0 - 0xff)
8-bit red (0x0 - 0xff)
8-bit green (0x0 - 0xff)
8-bit blue (0x0 - 0xff)
| Color |
Method | Defined By | ||
---|---|---|---|
Color(red:uint = 0x0, green:uint = 0x0, blue:uint = 0x0, alpha:uint = 0xff)
Constructor, initializing color to black with full alpha. | Color | ||
[static]
Get ARGB values from 32-bit integer. | Color | ||
[static]
Get named color from color palette. | Color | ||
[static]
Get RGB values from 24-bit integer. | Color | ||
[static]
Get RGBA values from 32-bit integer. | Color | ||
getAlpha(color:uint):uint [static]
Get Alpha from a 32-bit ARGB unsigned integer. | Color | ||
getARGB(alpha:uint, red:uint, green:uint, blue:uint):uint [static]
Get 32-bit ARGB color as integer. | Color | ||
getARGBFromAlphaAndRGB(rgb:uint, alpha:uint = 0xff):uint [static]
Get 32-bit ARGB by combining 8-bit Alpha with 24-bit RGB. | Color | ||
getARGBFromRGBA(color:uint):uint [static]
Get 32-bit ARGB from RGBA unsigned int. | Color | ||
getBlue(color:uint):uint [static]
Get Blue from an unsigned integer. | Color | ||
getGreen(color:uint):uint [static]
Get Green from an unsigned integer. | Color | ||
getRed(color:uint):uint [static]
Get Red from an unsigned integer. | Color | ||
getRGB(red:uint, green:uint, blue:uint):uint [static]
Get 24-bit RGB color as integer. | Color | ||
getRGBA(red:uint, green:uint, blue:uint, alpha:uint):uint [static]
Get 32-bit RGBA color as integer. | Color | ||
getRGBAFromARGB(color:uint):uint [static]
Get 32-bit RGBA from ARGB unsigned int. | Color | ||
initialize():void
IInitialize initialization. | Color | ||
registerClass():void [static]
| Color |
alpha | property |
alpha:uint
[read-only] Get unsigned int of 8-bit alpha.
public function get alpha():uint
argb | property |
argb:uint
[read-only] Get 32-bit unsigned int of 8-bit alpha, red, green, blue.
public function get argb():uint
blue | property |
blue:uint
[read-only] Get unsigned int of 8-bit blue.
public function get blue():uint
color | property |
protected var color:uint
32-bit ARGB color 8-bit alpha (0x0 - 0xff) 8-bit red (0x0 - 0xff) 8-bit green (0x0 - 0xff) 8-bit blue (0x0 - 0xff)
green | property |
green:uint
[read-only] Get unsigned int of 8-bit green.
public function get green():uint
red | property |
red:uint
[read-only] Get unsigned int of 8-bit red.
public function get red():uint
rgb | property |
rgb:uint
[read-only] Get 24-bit unsigned int of 8-bit red, green, and blue
public function get rgb():uint
rgba | property |
rgba:uint
[read-only] Get 32-bit unsigned int of 8-bit red, green, blue, alpha.
public function get rgba():uint
Color | () | Constructor |
public function Color(red:uint = 0x0, green:uint = 0x0, blue:uint = 0x0, alpha:uint = 0xff)
Constructor, initializing color to black with full alpha.
Parametersred:uint (default = 0x0 ) — 8-bit red.
| |
green:uint (default = 0x0 ) — 8-bit green.
| |
blue:uint (default = 0x0 ) — 8-bit blue.
| |
alpha:uint (default = 0xff ) — 8-bit alpha.
|
fromARGB | () | method |
public static function fromARGB(color:uint):Color
Get ARGB values from 32-bit integer.
Parameters
color:uint — 32-bit ARGB color as unsigned integer.
|
Color — Color instance of 8-bit alpha, red, green, blue.
|
fromName | () | method |
public static function fromName(name:String):Color
Get named color from color palette.
Parameters
name:String — Name of color from color palette class.
|
Color — 24-bit RGB unsigned integer of color.
|
See also
fromRGB | () | method |
public static function fromRGB(color:uint):Color
Get RGB values from 24-bit integer.
Parameters
color:uint — 24-bit RGB color as unsigned integer.
|
Color — Color instance of 8-bit red, green, blue.
|
fromRGBA | () | method |
public static function fromRGBA(color:uint):Color
Get RGBA values from 32-bit integer. In ActionScript, ARGB is typically used. Use getARGB for ARGB value. This function is provided for compatibility.
Parameters
color:uint — 32-bit ARGB color as unsigned integer.
|
Color — Color instance of 8-bit red, green, blue, alpha.
|
getAlpha | () | method |
public static function getAlpha(color:uint):uint
Get Alpha from a 32-bit ARGB unsigned integer.
Parameters
color:uint — 32-bit ARGB color as unsigned integer.
|
uint — 8-bit alpha.
|
getARGB | () | method |
public static function getARGB(alpha:uint, red:uint, green:uint, blue:uint):uint
Get 32-bit ARGB color as integer.
Parameters
alpha:uint — 8-bit Alpha.
| |
red:uint — 8-bit Red.
| |
green:uint — 8-bit Green.
| |
blue:uint — 8-bit Blue.
|
uint — 32-bit ARGB unsigned integer.
|
getARGBFromAlphaAndRGB | () | method |
public static function getARGBFromAlphaAndRGB(rgb:uint, alpha:uint = 0xff):uint
Get 32-bit ARGB by combining 8-bit Alpha with 24-bit RGB.
Parameters
rgb:uint — 8-bit Alpha.
| |
alpha:uint (default = 0xff ) — 24-bit RGB.
|
uint — 32-bit ARGB unsigned integer.
|
getARGBFromRGBA | () | method |
public static function getARGBFromRGBA(color:uint):uint
Get 32-bit ARGB from RGBA unsigned int.
Parameters
color:uint — 32-bit RGBA unsigned int.
|
uint — 32-bit ARGB unsigned int.
|
getBlue | () | method |
public static function getBlue(color:uint):uint
Get Blue from an unsigned integer.
Parameters
color:uint — 24-bit RGB color as unsigned integer.
|
uint — 8-bit blue.
|
getGreen | () | method |
public static function getGreen(color:uint):uint
Get Green from an unsigned integer.
Parameters
color:uint — 24-bit RGB color as unsigned integer.
|
uint — 8-bit green.
|
getRed | () | method |
public static function getRed(color:uint):uint
Get Red from an unsigned integer.
Parameters
color:uint — 24-bit RGB color as unsigned integer.
|
uint — 8-bit red.
|
getRGB | () | method |
public static function getRGB(red:uint, green:uint, blue:uint):uint
Get 24-bit RGB color as integer.
Parameters
red:uint — 8-bit Red.
| |
green:uint — 8-bit Green.
| |
blue:uint — 8-bit Blue.
|
uint — 32-bit RGB unsigned integer.
|
getRGBA | () | method |
public static function getRGBA(red:uint, green:uint, blue:uint, alpha:uint):uint
Get 32-bit RGBA color as integer. In ActionScript, ARGB is typically used. Use getColor32 for ARGB value. This function is provided for compatibility
Parameters
red:uint — 8-bit Red.
| |
green:uint — 8-bit Green.
| |
blue:uint — 8-bit Blue.
| |
alpha:uint — 8-bit Alpha.
|
uint — 32-bit RGBA unsigned integer.
|
getRGBAFromARGB | () | method |
public static function getRGBAFromARGB(color:uint):uint
Get 32-bit RGBA from ARGB unsigned int.
Parameters
color:uint — 32-bit ARGB unsigned int.
|
uint — 32-bit RGBA unsigned int.
|
initialize | () | method |
public function initialize():void
IInitialize initialization.
registerClass | () | method |
public static function registerClass():void