code: private static int[] getRGBs(IndexColorModel pColorModel) {
          int[] rgb = new int[pColorModel.getMapSize()];
          pColorModel.getRGBs(rgb);
  
          return rgb;
      }
docs: Creates a defensive copy of the RGB color map in the given
  {@code IndexColorModel}.
  
  @param pColorModel the indexed color model to get RGB values from
  @return the RGB color map