Packagecom.flashdynamix.motion.extras
Classpublic dynamic class ColorMatrix

Has methods that provide enhancements to assist with applying ColorMatrixFilter effects to DisplayObjects.
These methods include :



Public Properties
 PropertyDefined by
  brightness : Number
Sets and returns a brightness amount from -1 to 1.
ColorMatrix
  colorize : uint
Sets and returns a hexadecimal number e.g.
ColorMatrix
  colorizeAmount : Number
Sets and returns the amount of this color to apply from 0 to 1.
ColorMatrix
  contrast : Number
Sets and returns the amount of contrast offset from 0 (gray) to 1 (normal) to 10 (high contrast).
ColorMatrix
  hueRotation : Number
Sets and returns the amount in degrees to rotate the hueRotation from -360 to 360.
ColorMatrix
  saturation : Number
Sets and returns the amount of saturation offset from 0 (grayscale) to 1 (normal) to 10 (highly saturated).
ColorMatrix
  threshold : Number
Sets and returns the amount of threshold to apply from 0 to 256.
ColorMatrix
Public Methods
 MethodDefined by
  
ColorMatrix(brightness:Number = 0, saturation:Number = 1, contrast:Number = 1, hueRotation:Number = 0, threshold:Number = -1, colorize:int = -1, colorizeAmount:Number = -1)
Constructs an instance of ColorMatrix.
ColorMatrix
  
revert():void
Reverts the ColorMatrix back to it's initial setting undoing all effects applied.
ColorMatrix
Public Constants
 ConstantDefined by
  identity : Array
[static]
ColorMatrix
Property detail
brightnessproperty
brightness:Number  [read-write]

Sets and returns a brightness amount from -1 to 1.

Implementation
    public function get brightness():Number
    public function set brightness(value:Number):void
colorizeproperty 
colorize:uint  [read-write]

Sets and returns a hexadecimal number e.g. 0xFFFFFF will turn the picture into grayscale.

Implementation
    public function get colorize():uint
    public function set colorize(value:uint):void
colorizeAmountproperty 
colorizeAmount:Number  [read-write]

Sets and returns the amount of this color to apply from 0 to 1.

Implementation
    public function get colorizeAmount():Number
    public function set colorizeAmount(value:Number):void
contrastproperty 
contrast:Number  [read-write]

Sets and returns the amount of contrast offset from 0 (gray) to 1 (normal) to 10 (high contrast).

Implementation
    public function get contrast():Number
    public function set contrast(value:Number):void
hueRotationproperty 
hueRotation:Number  [read-write]

Sets and returns the amount in degrees to rotate the hueRotation from -360 to 360.

Implementation
    public function get hueRotation():Number
    public function set hueRotation(value:Number):void
saturationproperty 
saturation:Number  [read-write]

Sets and returns the amount of saturation offset from 0 (grayscale) to 1 (normal) to 10 (highly saturated).

Implementation
    public function get saturation():Number
    public function set saturation(value:Number):void
thresholdproperty 
threshold:Number  [read-write]

Sets and returns the amount of threshold to apply from 0 to 256.

Implementation
    public function get threshold():Number
    public function set threshold(value:Number):void
Constructor detail
ColorMatrix()constructor
public function ColorMatrix(brightness:Number = 0, saturation:Number = 1, contrast:Number = 1, hueRotation:Number = 0, threshold:Number = -1, colorize:int = -1, colorizeAmount:Number = -1)

Constructs an instance of ColorMatrix.

Parameters
brightness:Number (default = 0) — The current matrix used by the ColorMatrixFilter.
 
saturation:Number (default = 1)
 
contrast:Number (default = 1)
 
hueRotation:Number (default = 0)
 
threshold:Number (default = -1)
 
colorize:int (default = -1)
 
colorizeAmount:Number (default = -1)
Method detail
revert()method
public function revert():void

Reverts the ColorMatrix back to it's initial setting undoing all effects applied.

Constant detail
identityconstant
public static const identity:Array