code: public void setColorFill(Color color) {
      	PdfXConformanceImp.checkPDFXConformance(writer, PdfXConformanceImp.PDFXKEY_COLOR, color);
          int type = ExtendedColor.getType(color);
          switch (type) {
              case ExtendedColor.TYPE_GRAY: {
                  setGrayFill(((GrayColor)color).getGray());
                  break;
              }
              case ExtendedColor.TYPE_CMYK: {
                  CMYKColor cmyk = (CMYKColor)color;
                  setCMYKColorFillF(cmyk.getCyan(), cmyk.getMagenta(), cmyk.getYellow(), cmyk.getBlack());
                  break;
              }
              case ExtendedColor.TYPE_SEPARATION: {
                  SpotColor spot = (SpotColor)color;
                  setColorFill(spot.getPdfSpotColor(), spot.getTint());
                  break;
              }
              case ExtendedColor.TYPE_PATTERN: {
                  PatternColor pat = (PatternColor) color;
                  setPatternFill(pat.getPainter());
                  break;
              }
              case ExtendedColor.TYPE_SHADING: {
                  ShadingColor shading = (ShadingColor) color;
                  setShadingFill(shading.getPdfShadingPattern());
                  break;
              }
              default:
                  setRGBColorFill(color.getRed(), color.getGreen(), color.getBlue());
          }
      }
docs: Sets the fill color. <CODE>color</CODE> can be an
  <CODE>ExtendedColor</CODE>.
  @param color the color