docs: public void buildColorTable(int[] inPixels, int[] table) {
          int count = inPixels.length;
          maximumColors = table.length;
          for (int i = 0; i < count; i++) {
              insertColor(inPixels[i]);
              if (colors > reduceColors)
                  reduceTree(reduceColors);
          }
          if (colors > maximumColors)
              reduceTree(maximumColors);
          buildColorTable(root, table, 0);
      }