Packagecom.yworks.util
Classpublic class ColorStruct
InheritanceColorStruct Inheritance Object

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
  blue : uint
[read-only] The blue part of the color.
ColorStruct
  color : uint
[read-only] The RGB value of this ColorStruct
ColorStruct
  green : uint
[read-only] The green part of the color.
ColorStruct
  red : uint
[read-only] The red part of the color.
ColorStruct
Public Methods
 MethodDefined By
  
ColorStruct(color:uint, alpha:Number)
Constructs an instance with the given RGB color and the given alpha value.
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
blueproperty 
blue:uint  [read-only]

The blue part of the color.


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

The RGB value of this ColorStruct


Implementation
    public function get color():uint
greenproperty 
green:uint  [read-only]

The green part of the color.


Implementation
    public function get green():uint
redproperty 
red:uint  [read-only]

The red part of the color.


Implementation
    public function get red():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.