Package org.apache.commons.imaging.palette

# Interface Palette

All Known Implementing Classes:
  `QuantizedPalette`, `SimplePalette`

public interface Palette
Color palette.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getEntry(int index)`
  Gets the color for a given palette index.
  `int`
  `getPaletteIndex(int rgb)`
  Gets the palette index for a given color.
  `int`
  `length()`
  Gets the number of entries in the palette.

- ## Method Details

  - ### getEntry

    int getEntry(int index)
    Gets the color for a given palette index.
    Parameters:
      `index` - the palette index to look up
    Returns:
      the color in ARGB format

  - ### getPaletteIndex

    int getPaletteIndex(int rgb) throws ImagingException
    Gets the palette index for a given color.
    Parameters:
      `rgb` - the color to look up
    Returns:
      the palette index
    Throws:
      `ImagingException` - if it fails to read the palette index

  - ### length

    int length()
    Gets the number of entries in the palette.
    Returns:
      the number of palette entries