Color rendering hint key.
The COLOR_RENDERING hint controls the accuracy of
approximation and conversion when storing colors into a
destination image or surface.
When a rendering or image manipulation operation produces a color value that must be stored into a destination, it must first convert that color into a form suitable for storing into the destination image or surface. Minimally, the color components must be converted to bit representations and ordered in the correct order or an index into a color lookup table must be chosen before the data can be stored into the destination memory. Without this minimal conversion, the data in the destination would likely represent random, incorrect or possibly even unsupported values. Algorithms to quickly convert the results of rendering operations into the color format of most common destinations are well known and fairly optimal to execute.
Simply performing the most basic color format conversion to
store colors into a destination can potentially ignore a
difference in the calibration of the
java.awt.color.ColorSpace
of the source and destination or other factors such as the
linearity of the gamma correction.
Unless the source and destination ColorSpace are
identical, to correctly perform a rendering operation with
the most care taken for the accuracy of the colors being
represented, the source colors should be converted to a
device independent ColorSpace and the results then
converted back to the destination ColorSpace.
Furthermore, if calculations such as the blending of multiple
source colors are to be performed during the rendering
operation, greater visual clarity can be achieved if the
intermediate device independent ColorSpace is
chosen to have a linear relationship between the values
being calculated and the perception of the human eye to
the response curves of the output device.
The allowable values for this hint are
Diagram: RenderingHints