Packagecom.kraftner.geom
Classpublic class StaticPalette
InheritanceStaticPalette Inheritance Palette

Basic Palette which you can edit manually. In contrast to dynamic Palettes the Static Palette doesn't extend itself when out of Colors.

See also

com.kraftner.geom.Palette.extend()


Public Properties
 PropertyDefined by
 Inheritedlength : uint
Number of Colors on this Palette
Palette
Protected Properties
 PropertyDefined by
 Inheritedpalette : Vector
Holds the Color Objects of this palette.
Palette
Public Methods
 MethodDefined by
  
addColor(c:Color):void
Add a Color to this Palette
StaticPalette
  
addGradient(start:Color, end:Color, steps:uint = 10):void
Add a number of Colors representing a Gradient to this palette.
StaticPalette
 Inherited
Returns a Color Object representing the average color of this Palette
Palette
 Inherited
Returns a copy of this Palette
Palette
 Inherited
Returns the current Color of this Palette.
Palette
  
fillWithHex(hex:Array):void
Adds a number of Colors stored in HEX format in an Array
StaticPalette
 Inherited
getIndex(index:uint, movePointer:Boolean = true):Color
Returns the color at a certain position of this Palette.
Palette
 Inherited
Returns the next Color of this Palette.
Palette
 Inherited
Returns the previous Color of this Palette.
Palette
 Inherited
sortByBlue():void
Sorts the Colors of this Palette by the blue part of the contained Colors.
Palette
 Inherited
Sorts the Colors of this Palette by the brightness of the contained Colors.
Palette
 Inherited
sortByGreen():void
Sorts the Colors of this Palette by the green part of the contained Colors.
Palette
 Inherited
sortByHEX():void
Sorts the Colors of this Palette by the HEX value of the contained Colors.
Palette
 Inherited
sortByHue():void
Sorts the Colors of this Palette by the Hue of the contained Colors
Palette
 Inherited
Sorts the Colors of this Palette by the lightness (as set by the HSL Colorsystem) of the contained Colors.
Palette
 Inherited
sortByProximity(color:Color):void
Sorts the Colors of this Palette by the proximity of the contained Colors to a certain Color
Palette
 Inherited
sortByRed():void
Sorts the Colors of this Palette by the red part of the contained Colors.
Palette
 Inherited
Sorts the Colors of this Palette by the saturation (as set by the HSL Colorsystem) of the contained Colors.
Palette
 Inherited
Sorts the Colors of this Palette by the saturation (as set by the HSV Colorsystem) of the contained Colors.
Palette
 Inherited
sortByValue():void
Sorts the Colors of this Palette by the value (as set by the HSV Colorsystem) of the contained Colors.
Palette
Protected Methods
 MethodDefined by
 Inherited
extend(index:uint):void
Defines the rule by which a Palette extends itself when the end is reached.
Palette
Method detail
addColor()method
public function addColor(c:Color):void

Add a Color to this Palette

Parameters
c:Color — Color to add to this Palette

See also

addGradient()method 
public function addGradient(start:Color, end:Color, steps:uint = 10):void

Add a number of Colors representing a Gradient to this palette.

Parameters
start:Color — Color to start the gradient with
 
end:Color — Color to end the gradient with
 
steps:uint (default = 10) — number of Colors the Gradient consists of
fillWithHex()method 
public function fillWithHex(hex:Array):void

Adds a number of Colors stored in HEX format in an Array

Parameters
hex:Array — Array containing HEX values