HSLColor
Utility class for managing a HSL color. More...
#include "Utils/HSLColor.h"
Public Functions
Name | |
---|---|
HSLColor | fromHSL(float * hsl) |
HSLColor | fromHSL(float hue, float saturation, float lightness) |
HSLColor | fromRGB(float * rgb) |
HSLColor | fromRGB(float red, float green, float blue) |
HSLColor | darken(float factor)<br>Creates a darker color. |
HSLColor | desaturate(float factor) |
std::array< float, 3 > | getHSL() const |
float | getHue() const |
float | getLightness() const |
std::array< float, 3 > | getRGB() const |
float | getSaturation() const |
HSLColor | lighten(float factor)<br>Creates a lighter color. |
HSLColor | makeComplementary() |
HSLColor | saturate(float factor) |
HSLColor | setHue(float mHue) |
HSLColor | setLightness(float mLightness) |
HSLColor | setSaturation(float mSaturation) |
HSLColor | shiftHue(float offset) |
Detailed Description
cpp
class HSLColor;
class HSLColor;
Utility class for managing a HSL color.
Inspired by https://tips4java.wordpress.com/2009/07/05/hsl-color/
Public Functions Documentation
function fromHSL
cpp
static HSLColor fromHSL(
float * hsl
)
static HSLColor fromHSL(
float * hsl
)
function fromHSL
cpp
static HSLColor fromHSL(
float hue,
float saturation,
float lightness
)
static HSLColor fromHSL(
float hue,
float saturation,
float lightness
)
function fromRGB
cpp
static HSLColor fromRGB(
float * rgb
)
static HSLColor fromRGB(
float * rgb
)
function fromRGB
cpp
static HSLColor fromRGB(
float red,
float green,
float blue
)
static HSLColor fromRGB(
float red,
float green,
float blue
)
function darken
cpp
HSLColor darken(
float factor
)
HSLColor darken(
float factor
)
Creates a darker color.
function desaturate
cpp
HSLColor desaturate(
float factor
)
HSLColor desaturate(
float factor
)
function getHSL
cpp
std::array< float, 3 > getHSL() const
std::array< float, 3 > getHSL() const
function getHue
cpp
float getHue() const
float getHue() const
function getLightness
cpp
float getLightness() const
float getLightness() const
function getRGB
cpp
std::array< float, 3 > getRGB() const
std::array< float, 3 > getRGB() const
function getSaturation
cpp
float getSaturation() const
float getSaturation() const
function lighten
cpp
HSLColor lighten(
float factor
)
HSLColor lighten(
float factor
)
Creates a lighter color.
function makeComplementary
cpp
HSLColor makeComplementary()
HSLColor makeComplementary()
function saturate
cpp
HSLColor saturate(
float factor
)
HSLColor saturate(
float factor
)
function setHue
cpp
HSLColor setHue(
float mHue
)
HSLColor setHue(
float mHue
)
function setLightness
cpp
HSLColor setLightness(
float mLightness
)
HSLColor setLightness(
float mLightness
)
function setSaturation
cpp
HSLColor setSaturation(
float mSaturation
)
HSLColor setSaturation(
float mSaturation
)
function shiftHue
cpp
HSLColor shiftHue(
float offset
)
HSLColor shiftHue(
float offset
)
Updated on 2024-11-06 at 20:16:53 +0000