Packagegraphics.colors
Classpublic class CMY
InheritanceCMY Inheritance Object
Implements ColorSpace
Subclasses CMYK

CMY is the complement of RGB, it’s a subtractive systems with 3 components: Cyan, Magenta and Yellow.

The conversion from RGB is a simple subtraction, since they complement each other. When painting on a paper you are subtracting colors, meaning they will be reflected.



Public Properties
 PropertyDefined By
  c : Number
The cyan component (between 0 and 1)
CMY
  m : Number
The magenta component (between 0 and 1)
CMY
  y : Number
The yellow component (between 0 and 1)
CMY
Public Methods
 MethodDefined By
  
CMY(c:Number = 0, m:Number = 0, y:Number = 0)
Creates a new CMY instance.
CMY
  
clone():*
Creates and returns a shallow copy of the object.
CMY
  
difference():void
Transforms the cyan, magenta and yellow components of the color in this difference color representation.
CMY
  
equals(o:*):Boolean
Compares the specified object with this object for equality.
CMY
  
interpolate(color:CMY, level:Number = 1):CMY
Interpolate the color and returns a new CMY object.
CMY
  
set(... args):void
Sets all tree components of a color.
CMY
  
toObject():Object
Converts an object to an equivalent Object value.
CMY
  
toSource(indent:int = 0):String
Returns the source code string representation of the object.
CMY
  
toString():String
Returns a String representation of the object.
CMY
Property Detail
cproperty
c:Number

The cyan component (between 0 and 1)


Implementation
    public function get c():Number
    public function set c(value:Number):void
mproperty 
m:Number

The magenta component (between 0 and 1)


Implementation
    public function get m():Number
    public function set m(value:Number):void
yproperty 
y:Number

The yellow component (between 0 and 1)


Implementation
    public function get y():Number
    public function set y(value:Number):void
Constructor Detail
CMY()Constructor
public function CMY(c:Number = 0, m:Number = 0, y:Number = 0)

Creates a new CMY instance.

Parameters
c:Number (default = 0) — The cyan component, value between 0 and 1 (default 0).
 
m:Number (default = 0) — The magenta component, value between 0 and 1 (default 0).
 
y:Number (default = 0) — The yellow component, value between 0 and 1 (default 0).
Method Detail
clone()method
public function clone():*

Creates and returns a shallow copy of the object.

Returns
* — A new object that is a shallow copy of this instance.
difference()method 
public function difference():void

Transforms the cyan, magenta and yellow components of the color in this difference color representation.

equals()method 
public function equals(o:*):Boolean

Compares the specified object with this object for equality.

Parameters

o:*

Returns
Booleantrue if the the specified object is equal with this object.
interpolate()method 
public function interpolate(color:CMY, level:Number = 1):CMY

Interpolate the color and returns a new CMY object.

Parameters

color:CMY — The CMY reference used to interpolate the current CMY object.
 
level:Number (default = 1) — The level of the interpolation as a decimal, where 0 is the start and 1 is the end.

Returns
CMY — The new interpolate CMY reference.
set()method 
public function set(... args):void

Sets all tree components of a color.

Parameters

... args

toObject()method 
public function toObject():Object

Converts an object to an equivalent Object value.

Returns
Object — the Object representation of the instance.
toSource()method 
public function toSource(indent:int = 0):String

Returns the source code string representation of the object.

Parameters

indent:int (default = 0)

Returns
String — the source code string representation of the object.
toString()method 
public function toString():String

Returns a String representation of the object.

Returns
String — a String representation of the object.