27 template <color_space ColorSpace,
typename BaseComponent,
typename ViewComponent,
typename Derived>
28 class basic_rgb_color;
34 hsl_color(
double aHue,
double aSaturation,
double aLightness,
double aAlpha = 1.0);
35 template <color_space ColorSpace,
typename BaseComponent,
typename ViewComponent = BaseComponent,
typename Derived =
void>
57 template <
typename RgbColor>
58 typename RgbColor::return_type
to_rgb()
const
61 to_rgb(components.
x, components.
y, components.
z, components[3]);
62 typename RgbColor::return_type result;
63 result.set_red<
scalar>(components.
x);
64 result.set_green<
scalar>(components.
y);
65 result.set_blue<
scalar>(components.
z);
66 result.set_alpha<
scalar>(components[3]);
70 template <color_space ColorSpace,
typename BaseComponent,
typename ViewComponent = BaseComponent,
typename Derived =
void>
73 return from_rgb(aColor.template red<scalar>(), aColor.template green<scalar>(), aColor.template blue<scalar>(), aColor.template alpha<scalar>());
hsl_color unshade(double aDelta) const
static double undefined_hue()
hsl_color shade(double aDelta) const
hsl_color(const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &aColor)
static hsl_color from_rgb(const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &aColor)
void set_lightness(double aLightness)
void set_hue(double aHue)
bool operator!=(const hsl_color &aOther) const
hsl_color with_hue(double aNewHue) const
hsl_color lighter(double aCoeffecient, double aDelta) const
void set_alpha(double aAlpha)
double saturation() const
hsl_color with_saturation(double aNewSaturation) const
void set_saturation(double aSaturation)
hsl_color lighter(double aDelta) const
hsl_color with_lightness(double aNewLightness) const
static hsl_color from_rgb(scalar aRed, scalar aGreen, scalar aBlue, scalar aAlpha=1.0)
bool operator<(const hsl_color &aOther) const
bool operator==(const hsl_color &aOther) const
hsl_color(double aHue, double aSaturation, double aLightness, double aAlpha=1.0)
void to_rgb(scalar &aRed, scalar &aGreen, scalar &aBlue, scalar &aAlpha) const
bool hue_undefined() const
RgbColor::return_type to_rgb() const