Packagecom.yahoo.astra.utils
Classpublic class Color

Color creates a list of common color names with corresponding hex values. It can be used to retrive the common color name for a numerical value.



Public Properties
 PropertyDefined by
  hexValue : uint
The hexadecimal value of a color.
Color
  name : String
The common name of a color.
Color
Public Methods
 MethodDefined by
  
Color(name:String, hexValue:uint)
Constructor.
Color
  
getColorByHexValue(hexValue:uint):Color
[static] Returns the corresponding Color object from the hexadecimal value.
Color
  
getColorByName(name:String):Color
[static] Returns the corresponding Color object from the string name.
Color
  
toString():String
Returns a string value using the common color name.
Color
Public Constants
 ConstantDefined by
  AQUA : Color
[static]
Color
  BLACK : Color
[static]
Color
  BLUE : Color
[static]
Color
  FUCHSIA : Color
[static]
Color
  GRAY : Color
[static]
Color
  GREEN : Color
[static]
Color
  LIME : Color
[static]
Color
  MAROON : Color
[static]
Color
  NAVY : Color
[static]
Color
  OLIVE : Color
[static]
Color
  PURPLE : Color
[static]
Color
  RED : Color
[static]
Color
  SILVER : Color
[static]
Color
  TEAL : Color
[static]
Color
  WHITE : Color
[static]
Color
  YELLOW : Color
[static]
Color
Property detail
hexValueproperty
hexValue:uint  [read-write]

The hexadecimal value of a color.

Implementation
    public function get hexValue():uint
    public function set hexValue(value:uint):void
nameproperty 
name:String  [read-write]

The common name of a color.

Implementation
    public function get name():String
    public function set name(value:String):void
Constructor detail
Color()constructor
public function Color(name:String, hexValue:uint)

Constructor.

Parameters
name:String — The string name of a color.
 
hexValue:uint — The hexadecimal value of a color.
Method detail
getColorByHexValue()method
public static function getColorByHexValue(hexValue:uint):Color

Returns the corresponding Color object from the hexadecimal value.

Parameters
hexValue:uint — The hexadecimal value of a color.

Returns
Color — A Color object.
getColorByName()method 
public static function getColorByName(name:String):Color

Returns the corresponding Color object from the string name.

Parameters
name:String — The string name of a color (case-insensitive).

Returns
Color — A Color object.
toString()method 
public function toString():String

Returns a string value using the common color name.

Returns
String — String
Constant detail
AQUAconstant
public static const AQUA:Color
BLACKconstant 
public static const BLACK:Color
BLUEconstant 
public static const BLUE:Color
FUCHSIAconstant 
public static const FUCHSIA:Color
GRAYconstant 
public static const GRAY:Color
GREENconstant 
public static const GREEN:Color
LIMEconstant 
public static const LIME:Color
MAROONconstant 
public static const MAROON:Color
NAVYconstant 
public static const NAVY:Color
OLIVEconstant 
public static const OLIVE:Color
PURPLEconstant 
public static const PURPLE:Color
REDconstant 
public static const RED:Color
SILVERconstant 
public static const SILVER:Color
TEALconstant 
public static const TEAL:Color
WHITEconstant 
public static const WHITE:Color
YELLOWconstant 
public static const YELLOW:Color