|
|
|
WPF uses
a high-precision color representation. Windows has traditionally used 24 bits
for ‘true color’ (8 bits per channel) and 32 bits when transparency is
required. This is sufficient for normal screen technology, but only just. If
you perform any kind of image processing, it will tend to amplify the
limitations of this representation. Also, for certain display technologies
such as film, or high end flat panels, you simply need more bits of color
information in order to span the dynamic range of these displays without
color ‘banding’.
|
|
|
|
WPF uses
16 bits for each of the Alpha (transparency), Red, Green, and Blue channels.
The Color type represents each channel as a floating point number with a
nominal range of 0 to 1. (0 indicates minimum brightness or completely
transparent, 1 represents maximum brightness or completely opaque.)
|
|
|
|
The
Color type also allows values to go out of range. In some image processing
scenarios, it is possible for color values to be pushed out of their normal
range at one stage of processing, and for later stages to bring them back
into range. If Color disallowed such values, it would have to clip color
values, compromising the final results.
|