Digital implementation of RGB color format.
this(T, U, V)(T red, U green, V blue) if (allArithmetic!(T, U, V));
Parametrized ctor for working with any arithmetic types
- Parameters
T red |
red componemt |
U green |
green componemt |
V blue |
blue componemt |
Funcs for changing components of color
- Parameters
RGBColor rhs |
second color |
- Returns
- Distance between two colors in RGB space
RGBColor opBinary(string op)(auto ref RGBColor rhs);
void opOpAssign(string op)(auto ref RGBColor rhs);
Arithmetic operations for colors
- Parameters
RGBColor rhs |
second color |
RGBColor opBinary(string op, T)(auto ref T rhs) if (allArithmetic!T);
RGBColor opBinaryRight(string op, T)(auto ref T rhs) if (allArithmetic!T);
Arithmetic operations between color and arithmetic types
- Parameters
RGBColor gamma(T, U)(T coefficient, U power) if (allArithmetic!(T, U));
Gamma correction
- Parameters
T coefficient |
... |
U power |
... |
- Returns
- Corrected color
RGBColor log(T)(T base = cast(T)2) if (allArithmetic!(T, U));
Logarithm of the color
- Parameters
- Returns
- New color - logarithm of the color
Inversion
- Returns
- New inverted color