Class SimplePalette
- java.lang.Object
-
- org.apache.commons.imaging.palette.SimplePalette
-
-
Constructor Summary
Constructors Constructor Description SimplePalette(int[] palette)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEntry(int index)
Looks up the color for a given palette index.int
getPaletteIndex(int rgb)
Looks up the palette index for a given color.int
length()
The number of entries in the palette.
-
-
-
Method Detail
-
getPaletteIndex
public int getPaletteIndex(int rgb)
Description copied from interface:Palette
Looks up the palette index for a given color.- Specified by:
getPaletteIndex
in interfacePalette
- Parameters:
rgb
- the color to look up- Returns:
- the palette index
-
getEntry
public int getEntry(int index)
Description copied from interface:Palette
Looks up the color for a given palette index.
-
-