Chapter 4. Colors and Fonts

This chapter introduces the use of colors and fonts.

Colors are interpreted by color models, so our discussion of colors starts by looking at the two types of color models the AWT offers: index color models and direct color models. After discussing the use of color models, we'll take a look at the java.awt.Color class. Colors and color models are most pertinent to image manipulation; therefore, the discussion in this chapter serves as a basis for the “Image Filtering” chapter beginning.

The font discussion centers around the Font and FontMetrics classes and the AWT's font model, which ...

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.