Color Models

Color models translate pixel values into their red, green, blue, and alpha constituents, as presented in evidenced by Table 4-1, which lists the methods from the abstract java.awt.image.ColorModel class (minus the 2D Api methods introduced in the 1.2 JDK).

Table 4-1. java.awt.image.ColorModel Methods (2D Api Methods Omitted)
Method Implementation or Intent
static ColorModel getRGBdefault() Returns the default RGB color model
abstract int getAlpha(int) Returns the color's alpha component
abstract int getBlue(int) Returns the color's blue component
abstract int getGreen(int) Returns the color's green component
abstract int getRed(int) Returns the color's red component
int getRGB(int) Returns the color of the pixel in RGB format
int ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.