Rose
Public Member Functions | List of all members
rose::color::HSVA Class Reference

Hue Saturation Value (or Brightness) representation of a color. More...

#include <Color.h>

Inheritance diagram for rose::color::HSVA:
Inheritance graph
[legend]
Collaboration diagram for rose::color::HSVA:
Collaboration graph
[legend]

Public Member Functions

constexpr HSVA (std::array< float, 4 > v) noexcept
 
constexpr HSVA (float h, float s, float v, float a) noexcept
 
constexpr HSVA modValue (float dValue) const noexcept
 
constexpr HSVA withHue (uint32_t hue) const
 Get a new colour from this HSL colour by modifying the hue. More...
 
constexpr HSVA withSaturation (float sat) const
 Get a new colour from this HSL colour by modifying the saturation. More...
 
constexpr HSVA withValue (float val) const
 Get a new colour from this HSL colour by modifying the value. More...
 
constexpr HSVA withMinSaturation (float sat) const
 Get a new colour from this HSL colour by modifying the saturation value. More...
 
constexpr HSVA contrasting () const
 Get a new contrasting colour to this HSL colour. More...
 
constexpr RGBA toRGBA () const noexcept
 Convert to RGBA in an array of floats. More...
 
constexpr float & hue () noexcept
 
constexpr float hue () const noexcept
 
constexpr float & saturation () noexcept
 
constexpr float saturation () const noexcept
 
constexpr float & value () noexcept
 
constexpr float value () const noexcept
 
constexpr float & alpha () noexcept
 
constexpr float alpha () const noexcept
 
constexpr HSVA interpolate (const HSVA &to, float v) const noexcept
 
constexpr HSVA (std::array< float, 4 > v) noexcept
 
constexpr HSVA modValue (float dValue) const noexcept
 
constexpr HSVA withHue (uint32_t hue) const
 Get a new colour from this HSL colour by modifying the hue value. More...
 
constexpr HSVA withMinSaturation (float sat) const
 Get a new colour from this HSL colour by modifying the hue value. More...
 
constexpr HSVA contrasting () const
 Get a new contrasting colour to this HSL colour. More...
 
constexpr RGBA toRGBA () const noexcept
 Convert to RGBA in an array of floats. More...
 
constexpr float & hue () noexcept
 
constexpr float hue () const noexcept
 
constexpr float & saturation () noexcept
 
constexpr float saturation () const noexcept
 
constexpr float & value () noexcept
 
constexpr float value () const noexcept
 
constexpr float & alpha () noexcept
 
constexpr float alpha () const noexcept
 
- Public Member Functions inherited from rose::color::Value
constexpr Value () noexcept
 Constructor, initialize color to transparent black.
 
constexpr Value (std::array< float, 4 > v) noexcept
 
constexpr Value () noexcept
 Constructor, initialize color to transparent black.
 
constexpr Value (std::array< float, 4 > v) noexcept
 

Detailed Description

Hue Saturation Value (or Brightness) representation of a color.

Member Function Documentation

◆ contrasting() [1/2]

constexpr HSVA rose::color::HSVA::contrasting ( ) const
inline

Get a new contrasting colour to this HSL colour.

Returns
A new contrasting HSL colour.

◆ contrasting() [2/2]

constexpr HSVA rose::color::HSVA::contrasting ( ) const
inline

Get a new contrasting colour to this HSL colour.

Returns
A new contrasting HSL colour.

◆ toRGBA() [1/2]

constexpr RGBA rose::color::HSVA::toRGBA ( ) const
inlinenoexcept

Convert to RGBA in an array of floats.

See hsl to rgb

Returns
RGBA colour Value.

◆ toRGBA() [2/2]

constexpr RGBA rose::color::HSVA::toRGBA ( ) const
inlinenoexcept

Convert to RGBA in an array of floats.

See hsl to rgb

Returns
RGBA colour Value.

◆ withHue() [1/2]

constexpr HSVA rose::color::HSVA::withHue ( uint32_t  hue) const
inline

Get a new colour from this HSL colour by modifying the hue value.

Parameters
hueThe new hue value
Returns
The new HSL colour.

◆ withHue() [2/2]

constexpr HSVA rose::color::HSVA::withHue ( uint32_t  hue) const
inline

Get a new colour from this HSL colour by modifying the hue.

Parameters
hueThe new hue.
Returns
The new HSL colour.

◆ withMinSaturation() [1/2]

constexpr HSVA rose::color::HSVA::withMinSaturation ( float  sat) const
inline

Get a new colour from this HSL colour by modifying the hue value.

Parameters
hueThe new hue value
Returns
The new HSL colour.

◆ withMinSaturation() [2/2]

constexpr HSVA rose::color::HSVA::withMinSaturation ( float  sat) const
inline

Get a new colour from this HSL colour by modifying the saturation value.

Parameters
satThe new saturation value
Returns
The new HSL colour.

◆ withSaturation()

constexpr HSVA rose::color::HSVA::withSaturation ( float  sat) const
inline

Get a new colour from this HSL colour by modifying the saturation.

Parameters
satThe new saturation.
Returns
The new HSL colour.

◆ withValue()

constexpr HSVA rose::color::HSVA::withValue ( float  val) const
inline

Get a new colour from this HSL colour by modifying the value.

Parameters
valThe new value.
Returns
The new HSL colour.

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