code: @Override
      public ColorModel getColorModel(int transparency) {
          if (transparency == Transparency.TRANSLUCENT) {
              return ColorModel.getRGBdefault();
          } else if (transparency == Transparency.OPAQUE) {
              return new DirectColorModel(32, 0x00ff0000, 0x0000ff00, 0x000000ff);
          } else {
              return null;
          }
      }
docs: Returns the color model for the specified transparency type, or
  {@code null}.
  
  @param transparency  the transparency type.
  
  @return A color model (possibly {@code null}).