neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::hsl_color Class Reference

#include <hsl_color.hpp>

Public Member Functions

 hsl_color ()
 
 hsl_color (double aHue, double aSaturation, double aLightness, double aAlpha=1.0)
 
template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
 hsl_color (const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &aColor)
 
double hue () const
 
double saturation () const
 
double lightness () const
 
double alpha () const
 
void set_hue (double aHue)
 
void set_saturation (double aSaturation)
 
void set_lightness (double aLightness)
 
void set_alpha (double aAlpha)
 
bool hue_undefined () const
 
hsl_color with_hue (double aNewHue) const
 
hsl_color with_saturation (double aNewSaturation) const
 
hsl_color with_lightness (double aNewLightness) const
 
hsl_color lighter (double aDelta) const
 
hsl_color lighter (double aCoeffecient, double aDelta) const
 
hsl_color shade (double aDelta) const
 
hsl_color unshade (double aDelta) const
 
void to_rgb (scalar &aRed, scalar &aGreen, scalar &aBlue, scalar &aAlpha) const
 
template<typename RgbColor >
RgbColor::return_type to_rgb () const
 
bool operator== (const hsl_color &aOther) const
 
bool operator!= (const hsl_color &aOther) const
 
bool operator< (const hsl_color &aOther) const
 

Static Public Member Functions

static hsl_color from_rgb (scalar aRed, scalar aGreen, scalar aBlue, scalar aAlpha=1.0)
 
template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
static hsl_color from_rgb (const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &aColor)
 
static double undefined_hue ()
 

Detailed Description

Definition at line 30 of file hsl_color.hpp.

Constructor & Destructor Documentation

◆ hsl_color() [1/3]

neogfx::hsl_color::hsl_color ( )

◆ hsl_color() [2/3]

neogfx::hsl_color::hsl_color ( double  aHue,
double  aSaturation,
double  aLightness,
double  aAlpha = 1.0 
)

◆ hsl_color() [3/3]

template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
neogfx::hsl_color::hsl_color ( const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &  aColor)
inline

Definition at line 36 of file hsl_color.hpp.

Member Function Documentation

◆ alpha()

double neogfx::hsl_color::alpha ( ) const

◆ from_rgb() [1/2]

template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
static hsl_color neogfx::hsl_color::from_rgb ( const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &  aColor)
inlinestatic

Definition at line 71 of file hsl_color.hpp.

◆ from_rgb() [2/2]

static hsl_color neogfx::hsl_color::from_rgb ( scalar  aRed,
scalar  aGreen,
scalar  aBlue,
scalar  aAlpha = 1.0 
)
static

◆ hue()

double neogfx::hsl_color::hue ( ) const

◆ hue_undefined()

bool neogfx::hsl_color::hue_undefined ( ) const

◆ lighter() [1/2]

hsl_color neogfx::hsl_color::lighter ( double  aCoeffecient,
double  aDelta 
) const

◆ lighter() [2/2]

hsl_color neogfx::hsl_color::lighter ( double  aDelta) const

◆ lightness()

double neogfx::hsl_color::lightness ( ) const

◆ operator!=()

bool neogfx::hsl_color::operator!= ( const hsl_color aOther) const

◆ operator<()

bool neogfx::hsl_color::operator< ( const hsl_color aOther) const

◆ operator==()

bool neogfx::hsl_color::operator== ( const hsl_color aOther) const

◆ saturation()

double neogfx::hsl_color::saturation ( ) const

◆ set_alpha()

void neogfx::hsl_color::set_alpha ( double  aAlpha)

◆ set_hue()

void neogfx::hsl_color::set_hue ( double  aHue)

◆ set_lightness()

void neogfx::hsl_color::set_lightness ( double  aLightness)

◆ set_saturation()

void neogfx::hsl_color::set_saturation ( double  aSaturation)

◆ shade()

hsl_color neogfx::hsl_color::shade ( double  aDelta) const

◆ to_rgb() [1/2]

template<typename RgbColor >
RgbColor::return_type neogfx::hsl_color::to_rgb ( ) const
inline

Definition at line 58 of file hsl_color.hpp.

◆ to_rgb() [2/2]

void neogfx::hsl_color::to_rgb ( scalar aRed,
scalar aGreen,
scalar aBlue,
scalar aAlpha 
) const

◆ undefined_hue()

static double neogfx::hsl_color::undefined_hue ( )
static

◆ unshade()

hsl_color neogfx::hsl_color::unshade ( double  aDelta) const

◆ with_hue()

hsl_color neogfx::hsl_color::with_hue ( double  aNewHue) const

◆ with_lightness()

hsl_color neogfx::hsl_color::with_lightness ( double  aNewLightness) const

◆ with_saturation()

hsl_color neogfx::hsl_color::with_saturation ( double  aNewSaturation) const

The documentation for this class was generated from the following file: