| Package | com.kraftner.geom |
| Class | public class Palette |
| Subclasses | DynamicPaletteHueCircle, DynamicPaletteRandom, StaticPalette |
This Class defines the base functionality of all Palettes which includes sorting methods and access to the contained colors.
This Class should not be instantiated directly. Use child classes like StaticPalette instead.
See also
| Property | Defined by | ||
|---|---|---|---|
| length : uint [read-only]
Number of Colors on this Palette
| Palette | ||
| Property | Defined by | ||
|---|---|---|---|
| palette : Vector
Holds the Color Objects of this palette.
| Palette | ||
| Method | Defined by | ||
|---|---|---|---|
|
Palette()
Constructor method.
| Palette | ||
|
Returns a Color Object representing the average color of this Palette
| Palette | ||
|
Returns a copy of this Palette
| Palette | ||
|
Returns the current Color of this Palette.
| Palette | ||
|
Returns the color at a certain position of this Palette.
| Palette | ||
|
Returns the next Color of this Palette.
| Palette | ||
|
Returns the previous Color of this Palette.
| Palette | ||
|
sortByBlue():void
Sorts the Colors of this Palette by the blue part of the contained Colors.
| Palette | ||
|
sortByBrightness():void
Sorts the Colors of this Palette by the brightness of the contained Colors.
| Palette | ||
|
sortByGreen():void
Sorts the Colors of this Palette by the green part of the contained Colors.
| Palette | ||
|
sortByHEX():void
Sorts the Colors of this Palette by the HEX value of the contained Colors.
| Palette | ||
|
sortByHue():void
Sorts the Colors of this Palette by the Hue of the contained Colors
| Palette | ||
|
sortByLightness():void
Sorts the Colors of this Palette by the lightness (as set by the HSL Colorsystem) of the contained Colors.
| Palette | ||
|
sortByProximity(color:Color):void
Sorts the Colors of this Palette by the proximity of the contained Colors to a certain Color
| Palette | ||
|
sortByRed():void
Sorts the Colors of this Palette by the red part of the contained Colors.
| Palette | ||
|
sortBySaturationHSL():void
Sorts the Colors of this Palette by the saturation (as set by the HSL Colorsystem) of the contained Colors.
| Palette | ||
|
sortBySaturationHSV():void
Sorts the Colors of this Palette by the saturation (as set by the HSV Colorsystem) of the contained Colors.
| Palette | ||
|
sortByValue():void
Sorts the Colors of this Palette by the value (as set by the HSV Colorsystem) of the contained Colors.
| Palette | ||
| Method | Defined by | ||
|---|---|---|---|
|
extend(index:uint):void
Defines the rule by which a Palette extends itself when the end is reached.
| Palette | ||
| length | property |
length:uint [read-only]Number of Colors on this Palette
Implementation public function get length():uint
| palette | property |
protected var palette:VectorHolds the Color Objects of this palette.
| Palette | () | constructor |
public function Palette()Constructor method. This Class should not be instantiated directly. Use child classes like StaticPalette instead.
See also
| average | () | method |
public function average():ColorReturns a Color Object representing the average color of this Palette
ReturnsColor —
average Color
|
| clone | () | method |
public function clone():PaletteReturns a copy of this Palette
ReturnsPalette —
copy of the original Palette Instance
|
| current | () | method |
public function current():ColorReturns the current Color of this Palette.
ReturnsColor —
current Color Object
|
See also
| extend | () | method |
protected function extend(index:uint):voidDefines the rule by which a Palette extends itself when the end is reached.
Parametersindex:uint |
See also
| getIndex | () | method |
public function getIndex(index:uint, movePointer:Boolean = true):ColorReturns the color at a certain position of this Palette.
Parametersindex:uint — Index of the Color to get. If the index is out of range and the extend function doesn't extend the Palette the first Color of the Palette is returned. |
|
movePointer:Boolean (default = true) — Change the pointer to the Color that is returned.
|
Color —
Color Object at the index-Position
|
See also
| next | () | method |
public function next():ColorReturns the next Color of this Palette. This moves the pointer of this palette to the next Color.
ReturnsColor —
next Color Object
|
See also
| prev | () | method |
public function prev():ColorReturns the previous Color of this Palette. This moves the pointer of this palette to the previous Color.
ReturnsColor —
previous Color Object
|
See also
| sortByBlue | () | method |
public function sortByBlue():voidSorts the Colors of this Palette by the blue part of the contained Colors.
| sortByBrightness | () | method |
public function sortByBrightness():voidSorts the Colors of this Palette by the brightness of the contained Colors.
| sortByGreen | () | method |
public function sortByGreen():voidSorts the Colors of this Palette by the green part of the contained Colors.
| sortByHEX | () | method |
public function sortByHEX():voidSorts the Colors of this Palette by the HEX value of the contained Colors.
The result of this might be unexpected and of little practical usefullness, but for matters of completeness this sorting Method is still offered.
| sortByHue | () | method |
public function sortByHue():voidSorts the Colors of this Palette by the Hue of the contained Colors
| sortByLightness | () | method |
public function sortByLightness():voidSorts the Colors of this Palette by the lightness (as set by the HSL Colorsystem) of the contained Colors.
| sortByProximity | () | method |
public function sortByProximity(color:Color):voidSorts the Colors of this Palette by the proximity of the contained Colors to a certain Color
Parameterscolor:Color |
| sortByRed | () | method |
public function sortByRed():voidSorts the Colors of this Palette by the red part of the contained Colors.
| sortBySaturationHSL | () | method |
public function sortBySaturationHSL():voidSorts the Colors of this Palette by the saturation (as set by the HSL Colorsystem) of the contained Colors.
| sortBySaturationHSV | () | method |
public function sortBySaturationHSV():voidSorts the Colors of this Palette by the saturation (as set by the HSV Colorsystem) of the contained Colors.
| sortByValue | () | method |
public function sortByValue():voidSorts the Colors of this Palette by the value (as set by the HSV Colorsystem) of the contained Colors.