FastLED 3.9.15
Loading...
Searching...
No Matches
crgb.h File Reference

Detailed Description

Defines the red, green, and blue (RGB) pixel struct.

Definition in file crgb.h.

#include "fl/stdint.h"
#include "fl/int.h"
#include "chsv.h"
#include "fl/namespace.h"
#include "color.h"
#include "lib8tion/types.h"
#include "fl/force_inline.h"
#include "fl/type_traits.h"
#include "hsv2rgb.h"
#include "fl/ease.h"
+ Include dependency graph for crgb.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CRGB
 Representation of an RGB pixel (Red, Green, Blue) More...
 
union  CRGB.__unnamed0__
 
struct  CRGB.__unnamed0__.__unnamed0__
 
union  CRGB.__unnamed0__.__unnamed0__.__unnamed0__
 
union  CRGB.__unnamed0__.__unnamed0__.__unnamed1__
 
union  CRGB.__unnamed0__.__unnamed0__.__unnamed2__
 

Namespaces

namespace  fl
 IMPORTANT!
 

Macros

#define FASTLED_HD_COLOR_MIXING   1
 

Functions

FASTLED_FORCE_INLINE void hsv2rgb_dispatch (const struct CHSV &hsv, struct CRGB &rgb)
 
FASTLED_FORCE_INLINE void hsv2rgb_dispatch (const struct CHSV *phsv, struct CRGB *prgb, int numLeds)
 HSV conversion function selection based on compile-time defines This allows users to configure which HSV conversion algorithm to use by setting one of the following defines:
 
FASTLED_FORCE_INLINE bool operator!= (const CHSV &lhs, const CHSV &rhs)
 Check if two CHSV objects do not have the same color data.
 
FASTLED_FORCE_INLINE bool operator!= (const CRGB &lhs, const CRGB &rhs)
 Check if two CRGB objects do not have the same color data.
 
FASTLED_FORCE_INLINE CRGB operator% (const CRGB &p1, fl::u8 d)
 Scale using CRGB::nscale8_video()
 
FASTLED_FORCE_INLINE CRGB operator& (const CRGB &p1, const CRGB &p2)
 Combine two CRGB objects, taking the smallest value of each channel.
 
FASTLED_FORCE_INLINE CRGB operator* (const CRGB &p1, fl::u8 d)
 Multiply each of the channels by a constant, saturating each channel at 0xFF.
 
FASTLED_FORCE_INLINE CRGB operator+ (const CRGB &p1, const CRGB &p2)
 Add one CRGB to another, saturating at 0xFF for each channel.
 
FASTLED_FORCE_INLINE CRGB operator- (const CRGB &p1, const CRGB &p2)
 Subtract one CRGB from another, saturating at 0x00 for each channel.
 
FASTLED_FORCE_INLINE CRGB operator/ (const CRGB &p1, fl::u8 d)
 Divide each of the channels by a constant.
 
FASTLED_FORCE_INLINE bool operator< (const CRGB &lhs, const CRGB &rhs)
 Check if the sum of the color channels in one CRGB object is less than another.
 
FASTLED_FORCE_INLINE bool operator<= (const CRGB &lhs, const CRGB &rhs)
 Check if the sum of the color channels in one CRGB object is less than or equal to another.
 
FASTLED_FORCE_INLINE bool operator== (const CHSV &lhs, const CHSV &rhs)
 Check if two CHSV objects have the same color data.
 
FASTLED_FORCE_INLINE bool operator== (const CRGB &lhs, const CRGB &rhs)
 Check if two CRGB objects have the same color data.
 
FASTLED_FORCE_INLINE bool operator> (const CRGB &lhs, const CRGB &rhs)
 Check if the sum of the color channels in one CRGB object is greater than another.
 
FASTLED_FORCE_INLINE bool operator>= (const CRGB &lhs, const CRGB &rhs)
 Check if the sum of the color channels in one CRGB object is greater than or equal to another.
 
FASTLED_FORCE_INLINE CRGB operator| (const CRGB &p1, const CRGB &p2)
 Combine two CRGB objects, taking the largest value of each channel.
 

Class Documentation

◆ CRGB.__unnamed0__

union CRGB.__unnamed0__
Class Members
struct CRGB.__unnamed0__.__unnamed0__ __unnamed__
u8 raw[3] Access the red, green, and blue data as an array.

Where:

  • raw[0] is the red value
  • raw[1] is the green value
  • raw[2] is the blue value

◆ CRGB.__unnamed0__.__unnamed0__

struct CRGB.__unnamed0__.__unnamed0__

◆ CRGB.__unnamed0__.__unnamed0__.__unnamed0__

union CRGB.__unnamed0__.__unnamed0__.__unnamed0__
Class Members
u8 r Red channel value.
u8 red

◆ CRGB.__unnamed0__.__unnamed0__.__unnamed1__

union CRGB.__unnamed0__.__unnamed0__.__unnamed1__
Class Members
u8 g Green channel value.
u8 green

◆ CRGB.__unnamed0__.__unnamed0__.__unnamed2__

union CRGB.__unnamed0__.__unnamed0__.__unnamed2__
Class Members
u8 b Blue channel value.
u8 blue