RGBA Color structure.  
 More...
#include <ccolor.h>
|  | 
| uint8_t | red {255} | 
|  | red component [0..255]  More... 
 | 
|  | 
| uint8_t | green {255} | 
|  | green component [0..255]  More... 
 | 
|  | 
| uint8_t | blue {255} | 
|  | blue component [0..255]  More... 
 | 
|  | 
| uint8_t | alpha {255} | 
|  | alpha component [0..255]  More... 
 | 
|  | 
| void | toHSV (double &hue, double &saturation, double &value) const | 
|  | convert to hue, saturation and value  More... 
 | 
|  | 
| void | fromHSV (double hue, double saturation, double value) | 
|  | convert from hue, saturation and value  More... 
 | 
|  | 
| void | toHSL (double &hue, double &saturation, double &lightness) const | 
|  | convert to hue, saturation and lightness  More... 
 | 
|  | 
| void | fromHSL (double hue, double saturation, double lightness) | 
|  | convert from hue, saturation and lightness  More... 
 | 
|  | 
| constexpr uint8_t | getLuma () const | 
|  | get the luma of the color  More... 
 | 
|  | 
| uint8_t | getLightness () const | 
|  | get the lightness of the color  More... 
 | 
|  | 
| template<typename T > | 
| constexpr T | normRed () const | 
|  | get the normalized red value  More... 
 | 
|  | 
| template<typename T > | 
| constexpr T | normGreen () const | 
|  | get the normalized green value  More... 
 | 
|  | 
| template<typename T > | 
| constexpr T | normBlue () const | 
|  | get the normalized blue value  More... 
 | 
|  | 
| template<typename T > | 
| constexpr T | normAlpha () const | 
|  | get the normalized alpha value  More... 
 | 
|  | 
| template<typename T > | 
| void | setNormRed (T v) | 
|  | set the red value normalized  More... 
 | 
|  | 
| template<typename T > | 
| void | setNormGreen (T v) | 
|  | set the green value normalized  More... 
 | 
|  | 
| template<typename T > | 
| void | setNormBlue (T v) | 
|  | set the blue value normalized  More... 
 | 
|  | 
| template<typename T > | 
| void | setNormAlpha (T v) | 
|  | set the alpha value normalized  More... 
 | 
|  | 
| bool | fromString (UTF8StringPtr str) | 
|  | 
| UTF8String | toString () const | 
|  | 
| static bool | isColorRepresentation (UTF8StringPtr str) | 
|  | 
◆ CColor() [1/3]
◆ CColor() [2/3]
  
  | 
        
          | constexpr CColor | ( | uint8_t | red, |  
          |  |  | uint8_t | green, |  
          |  |  | uint8_t | blue, |  
          |  |  | uint8_t | alpha = 255 |  
          |  | ) |  |  |  | inlineconstexpr | 
 
 
◆ CColor() [3/3]
◆ fromHSL()
      
        
          | void fromHSL | ( | double | hue, | 
        
          |  |  | double | saturation, | 
        
          |  |  | double | lightness | 
        
          |  | ) |  |  | 
      
 
convert from hue, saturation and lightness 
- Parameters
- 
  
    | hue | in degree [0..360] |  | saturation | normalized [0..1] |  | lightness | normalized [0..1] |  
 
 
 
◆ fromHSV()
      
        
          | void fromHSV | ( | double | hue, | 
        
          |  |  | double | saturation, | 
        
          |  |  | double | value | 
        
          |  | ) |  |  | 
      
 
convert from hue, saturation and value 
- Parameters
- 
  
    | hue | in degree [0..360] |  | saturation | normalized [0..1] |  | value | normalized [0..1] |  
 
 
 
◆ fromString()
◆ getLightness()
      
        
          | uint8_t getLightness | ( |  | ) | const | 
      
 
get the lightness of the color 
 
 
◆ getLuma()
  
  | 
        
          | constexpr uint8_t getLuma | ( |  | ) | const |  | inlineconstexpr | 
 
get the luma of the color 
 
 
◆ isColorRepresentation()
◆ normAlpha()
get the normalized alpha value 
 
 
◆ normBlue()
get the normalized blue value 
 
 
◆ normGreen()
get the normalized green value 
 
 
◆ normRed()
get the normalized red value 
 
 
◆ operator!=()
  
  | 
        
          | bool operator!= | ( | const CColor & | other | ) | const |  | inline | 
 
 
◆ operator()()
  
  | 
        
          | CColor & operator() | ( | uint8_t | _red, |  
          |  |  | uint8_t | _green, |  
          |  |  | uint8_t | _blue, |  
          |  |  | uint8_t | _alpha |  
          |  | ) |  |  |  | inline | 
 
 
◆ operator=()
◆ operator==()
  
  | 
        
          | bool operator== | ( | const CColor & | other | ) | const |  | inline | 
 
 
◆ setNormAlpha()
set the alpha value normalized 
 
 
◆ setNormBlue()
set the blue value normalized 
 
 
◆ setNormGreen()
set the green value normalized 
 
 
◆ setNormRed()
set the red value normalized 
 
 
◆ toHSL()
      
        
          | void toHSL | ( | double & | hue, | 
        
          |  |  | double & | saturation, | 
        
          |  |  | double & | lightness | 
        
          |  | ) |  | const | 
      
 
convert to hue, saturation and lightness 
- Parameters
- 
  
    | hue | in degree [0..360] |  | saturation | normalized [0..1] |  | lightness | normalized [0..1] |  
 
 
 
◆ toHSV()
      
        
          | void toHSV | ( | double & | hue, | 
        
          |  |  | double & | saturation, | 
        
          |  |  | double & | value | 
        
          |  | ) |  | const | 
      
 
convert to hue, saturation and value 
- Parameters
- 
  
    | hue | in degree [0..360] |  | saturation | normalized [0..1] |  | value | normalized [0..1] |  
 
 
 
◆ toString()
◆ alpha
◆ blue
◆ green
◆ red
The documentation for this struct was generated from the following files: