toxi.image.colour
Class PaletteUtil

java.lang.Object
  extended by toxi.image.colour.PaletteUtil

Deprecated.

@Deprecated
public class PaletteUtil
extends java.lang.Object


Constructor Summary
PaletteUtil()
          Deprecated.  
 
Method Summary
static int[] sortByLuminance(int[] cols)
          Deprecated. Sorts a given palette of packed (A)RGB integers by luminance.
static int[] sortByProximity(int[] cols, int basecol)
          Deprecated. Sorts a given palette of packed (A)RGB integers by proximity to a colour.
static int[] sortBySaturation(int[] cols)
          Deprecated. Sorts a given palette of packed (A)RGB integers by saturation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteUtil

public PaletteUtil()
Deprecated. 
Method Detail

sortBySaturation

public static int[] sortBySaturation(int[] cols)
Deprecated. 
Sorts a given palette of packed (A)RGB integers by saturation. The alpha channel is ignored.

Parameters:
cols - array of integers in standard packed (A)RGB format
Returns:
sorted version of array with element at last index containing the most saturated item of the palette

sortByLuminance

public static int[] sortByLuminance(int[] cols)
Deprecated. 
Sorts a given palette of packed (A)RGB integers by luminance. The alpha channel is ignored.

Parameters:
cols - array of integers in standard packed (A)RGB format
Returns:
sorted version of array with element at last index containing the "brightest" item of the palette

sortByProximity

public static int[] sortByProximity(int[] cols,
                                    int basecol)
Deprecated. 
Sorts a given palette of packed (A)RGB integers by proximity to a colour. The alpha channel is ignored.

Parameters:
cols - array of integers in standard packed (A)RGB format
basecol - colour to which proximity of all palette items is calculated
Returns:
sorted version of array with element at first index containing the "closest" item of the palette