Module java.desktop

Class ColorSpace

java.lang.Object
java.awt.color.ColorSpace
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ICC_ColorSpace

public abstract class ColorSpace extends Object implements Serializable
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice. It contains methods that transform colors in a specific color space to/from sRGB and to/from a well-defined CIEXYZ color space.

For purposes of the methods in this class, colors are represented as arrays of color components represented as floats in a normalized range defined by each ColorSpace. For many ColorSpaces (e.g. sRGB), this range is 0.0 to 1.0. However, some ColorSpaces have components whose values have a different range. Methods are provided to inquire per component minimum and maximum normalized values.

Several variables are defined for purposes of referring to color space types (e.g. TYPE_RGB, TYPE_XYZ, etc.) and to refer to specific color spaces (e.g. CS_sRGB and CS_CIEXYZ). sRGB is a proposed standard RGB color space. For more information, see http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html.

The purpose of the methods to transform to/from the well-defined CIEXYZ color space is to support conversions between any two color spaces at a reasonably high degree of accuracy. It is expected that particular implementations of subclasses of ColorSpace (e.g. ICC_ColorSpace) will support high performance conversion based on underlying platform color management systems.

The CS_CIEXYZ space used by the toCIEXYZ/fromCIEXYZ methods can be described as follows:


     CIEXYZ
     viewing illuminance: 200 lux
     viewing white point: CIE D50
     media white point: "that of a perfectly reflecting diffuser" -- D50
     media black point: 0 lux or 0 Reflectance
     flare: 1 percent
     surround: 20percent of the media white point
     media description: reflection print (i.e., RLAB, Hunt viewing media)
     note: For developers creating an ICC profile for this conversion
           space, the following is applicable. Use a simple Von Kries
           white point adaptation folded into the 3X3 matrix parameters
           and fold the flare and surround effects into the three
           one-dimensional lookup tables (assuming one uses the minimal
           model for monitors).

 
See Also: