FastLED 3.9.15
Loading...
Searching...
No Matches
CHSV Struct Reference

Detailed Description

Representation of an HSV pixel (hue, saturation, value (aka brightness)).

Examples
AnalogOutput.ino, ColorPalette.ino, Cylon.ino, DemoReel100.ino, Noise.ino, NoisePlusPalette.ino, OctoWS2811Demo.ino, ParallelOutputDemo.ino, Pride2015.ino, RGBSetDemo.ino, SmartMatrix.ino, and XYMatrix.ino.

Definition at line 16 of file chsv.h.

#include <chsv.h>

Public Member Functions

constexpr CHSV ()
 Default constructor.
 
constexpr CHSV (const CHSV &rhs) noexcept
 Allow copy construction.
 
constexpr CHSV (uint8_t ih, uint8_t is, uint8_t iv)
 Allow construction from hue, saturation, and value.
 
CHSVoperator= (const CHSV &rhs)=default
 Allow copy construction.
 
uint8_t & operator[] (uint8_t x)
 Array access operator to index into the CHSV object.
 
const uint8_t & operator[] (uint8_t x) const
 Array access operator to index into the CHSV object.
 
CHSVsetHSV (uint8_t ih, uint8_t is, uint8_t iv)
 Assign new HSV values.
 

Public Attributes

union { 
 
   struct { 
 
      union { 
 
uint8_t v
 Color value (brightness).
 
uint8_t val
 Color value (brightness).
 
uint8_t value
 Color value (brightness).
 
      }  
 
      union { 
 
uint8_t h
 Color hue.
 
uint8_t hue
 Color hue.
 
      }  
 
      union { 
 
uint8_t s
 Color saturation.
 
uint8_t sat
 Color saturation.
 
uint8_t saturation
 Color saturation.
 
      }  
 
   }  
 
uint8_t raw [3]
 Access the hue, saturation, and value data as an array.
 
};  
 

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