Class MedianCutPalette

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ColorGroup root  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPaletteIndex​(int rgb)
      Looks up the palette index for a given color.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MedianCutPalette

        MedianCutPalette​(ColorGroup root,
                         int[] 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 interface Palette
        Overrides:
        getPaletteIndex in class SimplePalette
        Parameters:
        rgb - the color to look up
        Returns:
        the palette index