Packagevegas.colors
Classpublic class Color
InheritanceColor Inheritance Object
Subclasses LightColor, SolidColor, TintColor, TransformColor

Color extends the Color Object.

Example :

     import vegas.colors.Color;
     var c:Color = new Color ( display ); // assuming 'display' is a DisplayObject
     c.setRGB(0xFF9900);
     



Public Properties
 PropertyDefined By
  colorTransform : ColorTransform
A ColorTransform object containing values that universally adjust the colors in the display object.
Color
  display : DisplayObject
[read-only] The DisplayObject reference of this object.
Color
  rgb : *
Indicates the R+G+B combination currently in use by the color object.
Color
Public Methods
 MethodDefined By
  
Color(display:DisplayObject)
Creates a new Color instance.
Color
  
getRGB():Number
Returns the R+G+B combination currently in use by the color object
Color
  
getTransform():Object
Returns the transform value set by the last setTransform() call.
Color
  
invert():void
Inverts the color of the specified Color reference in argument.
Color
  
reset():void
Resets the color of the specified Color reference in argument, the MovieClip display the original view since Color transformation.
Color
  
setRGB(hex:*):void
Specifies an RGB color for a Color object.
Color
  
setTransform(transformObject:Object):void
Sets color transform information for a Color object.
Color
  
toRGBString():String
Returns the string representation of the passed color with ECMAScript formatting (0xrrggbb).
Color
Public Constants
 ConstantDefined By
  EVALUATOR : ColorEvaluator
[static] The color evaluator singleton reference.
Color
Property Detail
colorTransformproperty
colorTransform:ColorTransform

A ColorTransform object containing values that universally adjust the colors in the display object.


Implementation
    public function get colorTransform():ColorTransform
    public function set colorTransform(value:ColorTransform):void
displayproperty 
display:DisplayObject  [read-only]

The DisplayObject reference of this object.


Implementation
    public function get display():DisplayObject
rgbproperty 
rgb:*

Indicates the R+G+B combination currently in use by the color object. The rgb property returns a Number but can be defines with a Number, a RGB object or a String color expression.


Implementation
    public function get rgb():*
    public function set rgb(value:any):void

See also

setRGB
Constructor Detail
Color()Constructor
public function Color(display:DisplayObject)

Creates a new Color instance.

new BasicColor(mc);

Parameters
display:DisplayObject — a DisplayObject reference.

Throws
ArgumentError — if the display argument is null or undefined.
Method Detail
getRGB()method
public function getRGB():Number

Returns the R+G+B combination currently in use by the color object

Returns
Number — A number that represents the RGB numeric value for the color specified.
getTransform()method 
public function getTransform():Object

Returns the transform value set by the last setTransform() call.

Returns
Object — An object whose properties contain the current offset and percentage values for the specified color.
invert()method 
public function invert():void

Inverts the color of the specified Color reference in argument.

reset()method 
public function reset():void

Resets the color of the specified Color reference in argument, the MovieClip display the original view since Color transformation.

setRGB()method 
public function setRGB(hex:*):void

Specifies an RGB color for a Color object.

Parameters

hex:* — 0xRRGGBB The hexadecimal or RGB color to be set. RR, GG, and BB each consist of two hexadecimal digits that specify the offset of each color component. The 0x tells the ActionScript compiler that the number is a hexadecimal value.

setTransform()method 
public function setTransform(transformObject:Object):void

Sets color transform information for a Color object. The colorTransformObject parameter is a generic object that you create from the new Object constructor. It has parameters specifying the percentage and offset values for the red, green, blue, and alpha (transparency) components of a color, entered in the format 0xRRGGBBAA.

Parameters

transformObject:Object — An object created with the new Object constructor. This instance of the Object class must have the following properties that specify color transform values: ra, rb, ga, gb, ba, bb, aa, ab. These properties are explained in the above summary for the setTransform() method.

toRGBString()method 
public function toRGBString():String

Returns the string representation of the passed color with ECMAScript formatting (0xrrggbb).

Returns
String — the string representation of the passed color with ECMAScript formatting (0xrrggbb).
Constant Detail
EVALUATORConstant
public static const EVALUATOR:ColorEvaluator

The color evaluator singleton reference.