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 intgetEntry(int index)Looks up the color for a given palette index.intgetPaletteIndex(int rgb)Looks up the palette index for a given color.intlength()The number of entries in the palette.
-
-
-
Method Detail
-
getPaletteIndex
public int getPaletteIndex(int rgb)
Description copied from interface:PaletteLooks up the palette index for a given color.- Specified by:
getPaletteIndexin interfacePalette- Parameters:
rgb- the color to look up- Returns:
- the palette index
-
getEntry
public int getEntry(int index)
Description copied from interface:PaletteLooks up the color for a given palette index.
-
-