Skip to content
Permalink
Browse files

Added DECLARE_GRADIENT_PALETTE, and Rainbow_gp definition just for co…

…mpleteness.
  • Loading branch information
kriegsman committed Aug 9, 2015
1 parent 8edbcaf commit 6b6285bd91f72f80af1cea5a1dc00c30e8758cca
Showing with 24 additions and 1 deletion.
  1. +17 −0 colorpalettes.cpp
  2. +4 −1 colorpalettes.h
  3. +3 −0 colorutils.h
@@ -154,4 +154,21 @@ extern const TProgmemRGBPalette16 HeatColors_p FL_PROGMEM =
0xFFFF33, 0xFFFF66, 0xFFFF99, 0xFFFFCC, 0xFFFFFF
};


// Gradient palette "Rainbow_gp",
// provided for situations where you're going
// to use a number of other gradient palettes, AND
// you want a 'standard' FastLED rainbow as well.

DEFINE_GRADIENT_PALETTE( Rainbow_gp ) {
0, 255, 0, 0, // Red
32, 171, 85, 0, // Orange
64, 171,171, 0, // Yellow
96, 0,255, 0, // Green
128, 0,171, 85, // Aqua
160, 0, 0,255, // Blue
192, 85, 0,171, // Purple
224, 171, 0, 85, // Pink
255, 255, 0, 0};// and back to Red

#endif
@@ -43,7 +43,10 @@ extern const TProgmemRGBPalette16 PartyColors_p FL_PROGMEM;
/// 'wrapping around' from the hot end to the cold end,
/// which looks wrong.
extern const TProgmemRGBPalette16 HeatColors_p FL_PROGMEM;



DECLARE_GRADIENT_PALETTE( Rainbow_gp);

FASTLED_NAMESPACE_END

///@}
@@ -1128,6 +1128,9 @@ void nblendPaletteTowardPalette( CRGBPalette16& currentPalette,
#define DEFINE_GRADIENT_PALETTE(X) \
extern const TProgmemRGBGradientPalette_byte X[] FL_PROGMEM =

#define DECLARE_GRADIENT_PALETTE(X) \
extern const TProgmemRGBGradientPalette_byte X[] FL_PROGMEM


// Functions to apply gamma adjustments, either:
// - a single gamma adjustment to a single scalar value,

0 comments on commit 6b6285b

Please sign in to comment.
You can’t perform that action at this time.