| Package | graphics.colors |
| Class | public class CMY |
| Inheritance | CMY Object |
| Implements | ColorSpace |
| Subclasses | CMYK |
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.
| Property | Defined 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 | ||
| Method | Defined 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 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 | ||
| c | property |
c:NumberThe cyan component (between 0 and 1)
public function get c():Number public function set c(value:Number):void| m | property |
m:NumberThe magenta component (between 0 and 1)
public function get m():Number public function set m(value:Number):void| y | property |
y:NumberThe yellow component (between 0 and 1)
public function get y():Number public function set y(value:Number):void| CMY | () | Constructor |
public function CMY(c:Number = 0, m:Number = 0, y:Number = 0)Creates a new CMY instance.
Parametersc: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).
|
| 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():voidTransforms the cyan, magenta and yellow components of the color in this difference color representation.
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameters
o:* |
Boolean — true if the the specified object is equal with this object.
|
| interpolate | () | method |
public function interpolate(color:CMY, level:Number = 1):CMYInterpolate 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.
|
CMY — The new interpolate CMY reference.
|
| set | () | method |
public function set(... args):voidSets all tree components of a color.
Parameters
... args |
| toObject | () | method |
public function toObject():ObjectConverts an object to an equivalent Object value.
ReturnsObject — the Object representation of the instance.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString():StringReturns a String representation of the object.
ReturnsString — a String representation of the object.
|