| Package | vegas.colors |
| Class | public class Color |
| Inheritance | Color 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);
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| Constant | Defined By | ||
|---|---|---|---|
| EVALUATOR : ColorEvaluator [static]
The color evaluator singleton reference. | Color | ||
| colorTransform | property |
colorTransform:ColorTransformA ColorTransform object containing values that universally adjust the colors in the display object.
public function get colorTransform():ColorTransform public function set colorTransform(value:ColorTransform):void| display | property |
display:DisplayObject [read-only] The DisplayObject reference of this object.
public function get display():DisplayObject| rgb | property |
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.
public function get rgb():* public function set rgb(value:any):voidSee also
| Color | () | Constructor |
public function Color(display:DisplayObject)Creates a new Color instance.
new BasicColor(mc);
display:DisplayObject — a DisplayObject reference.
|
ArgumentError — if the display argument is null or undefined.
|
| getRGB | () | method |
public function getRGB():NumberReturns the R+G+B combination currently in use by the color object
ReturnsNumber — A number that represents the RGB numeric value for the color specified.
|
| getTransform | () | method |
public function getTransform():ObjectReturns the transform value set by the last setTransform() call.
ReturnsObject — An object whose properties contain the current offset and percentage values for the specified color.
|
| invert | () | method |
public function invert():voidInverts the color of the specified Color reference in argument.
| reset | () | method |
public function reset():voidResets the color of the specified Color reference in argument, the MovieClip display the original view since Color transformation.
| setRGB | () | method |
public function setRGB(hex:*):voidSpecifies 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):voidSets 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():StringReturns the string representation of the passed color with ECMAScript formatting (0xrrggbb).
ReturnsString — the string representation of the passed color with ECMAScript formatting (0xrrggbb).
|
| EVALUATOR | Constant |
public static const EVALUATOR:ColorEvaluatorThe color evaluator singleton reference.