A channel is the building block of a color. Color is defined as a mixture of primary colors and a channel defines the degree to which each primary color is used in the mixture. More...
#include <channel.hpp>
Public Member Functions | |
void | constraints () |
Public Attributes | |
T | c |
A channel is the building block of a color. Color is defined as a mixture of primary colors and a channel defines the degree to which each primary color is used in the mixture.
For example, in the RGB color space, using 8-bit unsigned channels, the color red is defined as [255 0 0], which means maximum of Red, and no Green and Blue.
Built-in scalar types, such as int
and float
, are valid GIL channels. In more complex scenarios, channels may be represented as bit ranges or even individual bits. In such cases special classes are needed to represent the value and reference to a channel.
Channels have a traits class, channel_traits
, which defines their associated types as well as their operating ranges.