The abstract ColorModel class defines the way a Java program represents colors. It provides methods for extracting different color components from a pixel.
public class java.awt.image.ColorModel extends java.lang.Object { // Variables protected int pixel_bits; // Constructors public ColorModel (int bits); // Class Methods public static ColorModel getRGBdefault(); // Instance Methods public void finalize(); public abstract int getAlpha (int pixel); public abstract int getBlue (int pixel); public abstract int getGreen (int pixel); public int getPixelSize(); public abstract int getRed (int pixel); public int getRGB (int pixel); }
The pixel_bits variable saves the ColorModel's bits setting (the total number of bits per pixel).
The number of bits required per pixel using this model.
Constructs a ColorModel object.
The default ColorModel format, which uses 8 bits for each of a pixel's color components: alpha (transparency), red, green, and blue.
Object.finalize()
Cleans up when this object is garbage collected.
A pixel encoded with this ColorModel.
The current alpha setting of the pixel.
A pixel encoded with this ColorModel.
The current blue setting of the pixel.
A pixel encoded with this ColorModel.
The current green setting of the pixel.
The current pixel size for the color model.
A pixel encoded with this ColorModel.
The current red setting of the pixel.
A pixel encoded with this ColorModel.
The current combined red, green, and blue settings of the pixel.
Gets the color of pixel in the default RGB color model.
DirectColorModel, IndexColorModel, Object