MCPcopy Create free account
hub / github.com/FastLED/FastLED / getCurrentPalette

Function getCurrentPalette

examples/Audio/advanced/advanced.h:109–120  ·  view source on GitHub ↗

Get current color palette

Source from the content-addressed store, hash-verified

107
108// Get current color palette
109fl::CRGBPalette16 getCurrentPalette() {
110 switch(colorPalette.as_int()) {
111 case 0: return fl::CRGBPalette16(fl::RainbowColors_p);
112 case 1: return fl::CRGBPalette16(fl::HeatColors_p);
113 case 2: return fl::CRGBPalette16(fl::OceanColors_p);
114 case 3: return fl::CRGBPalette16(fl::ForestColors_p);
115 case 4: return fl::CRGBPalette16(fl::PartyColors_p);
116 case 5: return fl::CRGBPalette16(fl::LavaColors_p);
117 case 6: return fl::CRGBPalette16(fl::CloudColors_p);
118 default: return fl::CRGBPalette16(fl::RainbowColors_p);
119 }
120}
121
122// Beat detection algorithm
123bool detectBeat(float energy) {

Callers 5

drawSpectrumBarsFunction · 0.85
drawRadialSpectrumFunction · 0.85
drawWaveformFunction · 0.85
drawVUMeterFunction · 0.85
drawPlasmaWaveFunction · 0.85

Calls 2

CRGBPalette16Class · 0.50
as_intMethod · 0.45

Tested by

no test coverage detected