#include <KoColorSpaceMaths.h>
|
| template<class TReal > |
| static TReal | getLightness (TReal r, TReal g, TReal b) |
| |
| template<class TReal > |
| static TReal | getSaturation (TReal r, TReal g, TReal b) |
| |
Definition at line 944 of file KoColorSpaceMaths.h.
◆ getLightness()
template<class TReal >
| static TReal HSLType::getLightness |
( |
TReal | r, |
|
|
TReal | g, |
|
|
TReal | b ) |
|
inlinestatic |
◆ getSaturation()
template<class TReal >
| static TReal HSLType::getSaturation |
( |
TReal | r, |
|
|
TReal | g, |
|
|
TReal | b ) |
|
inlinestatic |
Definition at line 954 of file KoColorSpaceMaths.h.
954 {
958 TReal light = (
max +
min) * TReal(0.5);
959 TReal
div = TReal(1.0) - std::abs(TReal(2.0)*light - TReal(1.0));
960
961 if(div > std::numeric_limits<TReal>::epsilon())
963
964 return TReal(0.0);
965 }
KoColorSpaceMathsTraits< T >::compositetype div(T a, T b)
References Arithmetic::max(), and Arithmetic::min().
◆ lightnessIsAverage
| constexpr bool HSLType::lightnessIsAverage = true |
|
staticconstexpr |
The documentation for this struct was generated from the following file: