Packagecom.yworks.util
Classpublic class ColorStruct

A convenience class to work with colors and alpha values



Public Properties
 PropertyDefined by
  alpha : Number
[read-only] The alpha value of this ColorStruct
ColorStruct
  color : uint
[read-only] The RGB value of this ColorStruct
ColorStruct
Public Methods
 MethodDefined by
  
ColorStruct(color:uint, alpha:Number)
Constructs an instance with the given RGB color and the given alpha value.
ColorStruct
  
fromARGB(argb:uint):ColorStruct
[static] Factory method which creates a ColorStruct from an ARGB value.
ColorStruct
Property detail
alphaproperty
alpha:Number  [read-only]

The alpha value of this ColorStruct

Implementation
    public function get alpha():Number
colorproperty 
color:uint  [read-only]

The RGB value of this ColorStruct

Implementation
    public function get color():uint
Constructor detail
ColorStruct()constructor
public function ColorStruct(color:uint, alpha:Number)

Constructs an instance with the given RGB color and the given alpha value.

Parameters
color:uint — Color as RGB value
 
alpha:Number — Alpha value
Method detail
fromARGB()method
public static function fromARGB(argb:uint):ColorStruct

Factory method which creates a ColorStruct from an ARGB value.

Parameters
argb:uint — ARGB value

Returns
ColorStruct — An instance of ColorStruct created from the given ARGB value.