Core 1.0
Public Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
Hsl Class Reference

Color in HSL space. More...

#include <color.h>

Public Member Functions

 Hsl (const double &, const double &, const double &)
 Create a color in HSL space. More...
 
 Hsl (const Color &)
 Create a color in HSL space. More...
 
Color ToColor () const
 Convert a color in HSL space to RGB space.
 

Static Protected Member Functions

static double ToRgb (double, double, double)
 Conversion function. More...
 

Protected Attributes

double l = 0.0
 Hue, saturation, luminance.
 

Friends

class Color
 

Detailed Description

Color in HSL space.

Constructor & Destructor Documentation

◆ Hsl() [1/2]

Hsl::Hsl ( const double &  h,
const double &  s,
const double &  l 
)
explicit

Create a color in HSL space.

Parameters
hHue.
sSaturation.
lLightness.

◆ Hsl() [2/2]

Hsl::Hsl ( const Color c)
explicit

Create a color in HSL space.

Parameters
cColor in RGB space.

Member Function Documentation

◆ ToRgb()

double Hsl::ToRgb ( double  a,
double  b,
double  h 
)
staticprotected

Conversion function.

Parameters
a,bValues.
hHue.