/**
   * Instantiates a new color model with the specified pixel bit depth. The transferType is chosen
   * based on the pixel bits, and the other data fields are given default values.
   *
   * @param bits the array of component masks.
   */
  public ColorModel(int bits) {

    if (bits < 1) {
      // awt.271=The number of bits in bits is less than 1
      throw new IllegalArgumentException(Messages.getString("awt.271")); // $NON-NLS-1$
    }

    pixel_bits = bits;
    transferType = getTransferType(bits);
    cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
    hasAlpha = true;
    isAlphaPremultiplied = false;
    transparency = Transparency.TRANSLUCENT;

    numColorComponents = 3;
    numComponents = 4;

    this.bits = null;
  }