Additional properties for homogeneous colors.
Warning: overloaded operators preserve types and may cause overflows
Perform a per-channel hard-cast. Provides continuity with casting of D basic types. If this is not needed, consider using channelMap instead.
Warning: overloaded operators preserve types and may cause overflows
Warning: overloaded operators preserve types and may cause overflows
Sum of all channels
Construct an RGB color from a typical hex string.
The number of fields in this color type.
Whether or not all channel fields have the same base type.
Returns an instance of this color type with all fields set at their maximum values.
Returns an instance of this color type with all fields set at their minimum values.
Alpha-blend two colors.
Alpha-blend a color with an alpha channel on top of one without.
Construct an RGB color from a typical hex string.
Interpolate between two colors. See also: Gradient
Return a Color instance with all fields set to "value".
Apply a custom operation for each channel. Example: COLOR.op!q{(a + b) / 2}(colorA, colorB);
Additional properties for integer colors.
Additional properties for integer colors.
Represents a tuple of samples, usually used to represent a single color in some color space. This helper type allows manipulating such tuples more easily, and has special behavior for common color representations (e.g. special treatment of the "a" field as an alpha channel, and construction from hex strings for R/G/B colors). FieldTuple is a field spec, as parsed by ae.utils.meta.FieldList. By convention, each field's name indicates its purpose: - x: padding - a: alpha - l: lightness (or grey, for monochrome images) - others (r, g, b, etc.): color information