19template<
bool isStep = false, u
int32_t rampUpdateLenght_ms = 55,
bool shouldSaturateRamp = false>
struct PaletteMode :
22 static void on_enter_mode(
auto& ctx)
25 ctx.template set_config_bool<ConfigKeys::rampSaturates>(shouldSaturateRamp);
27 ctx.template set_config_bool<ConfigKeys::customRampAnimEffect>(
false);
29 ctx.template set_config_u32<ConfigKeys::customRampStepSpeedMs>(rampUpdateLenght_ms);
32 ctx.overlay_animate_ramp(255, ctx.state.palette, 1000);
35 static void loop(
auto& ctx)
40 const uint8_t customRamp = ctx.get_active_custom_ramp();
41 uint32_t color = modes::colors::from_palette<not shouldSaturateRamp>(
43 static_cast<uint8_t
>(isStep ? (customRamp >> 4) << 4 : customRamp),
55 static constexpr bool hasSunriseAnimation =
true;
57 static constexpr bool usesSunsetGravityDissolveMode =
true;
58 static constexpr bool usesSunriseGravityAppearMode =
true;
66 static uint8_t get_custom_ramp_default_value(
auto& ctx)
132 static uint8_t get_custom_ramp_default_value(
auto& ctx)
static constexpr PaletteTy PaletteBlackBodyColors
Black body radiation, with the high end changed to be nicer.
Definition: palettes.hpp:396
static constexpr PaletteTy PalettePartyColors
basically, HSV with no green. looks better when lighing people
Definition: palettes.hpp:378
static constexpr PaletteTy PaletteOceanColors
Ocean colors, blues and whites.
Definition: palettes.hpp:306
std::array< uint32_t, 16 > PaletteTy
Palette types.
Definition: palettes.hpp:18
static constexpr PaletteTy PaletteForestColors
Forest colors, greens.
Definition: palettes.hpp:342
static constexpr PaletteTy PaletteRainbowColors
HSV Rainbow.
Definition: palettes.hpp:360
static constexpr PaletteTy PalettePapiColors
Palette of nice handpicked colors.
Definition: palettes.hpp:450
modes::GroupFor< fixed::PalettePartyMode, fixed::PaletteForestMode, fixed::PaletteOceanMode > MiscFixedModes
Fixed palette colors modes.
Definition: fixed_modes.hpp:150
modes::GroupFor< fixed::PaletteBlackBodyMode, fixed::PaletteRainbowMode, fixed::PalettePapiMode > FixedModes
Fixed modes groups.
Definition: fixed_modes.hpp:148
GroupTy< std::tuple< Modes... > > GroupFor
Group together many different modes::BasicMode.
Definition: group_type.hpp:386
Program scope.
Definition: control_fixed_modes.hpp:14
Define some useful color palettes, and tools to use them.
Parent object for all custom user modes.
Definition: mode_type.hpp:53
Definition: fixed_modes.hpp:85
static constexpr modes::colors::PaletteTy palette
Color palette to use.
Definition: fixed_modes.hpp:87
BlackBody temperature fixed colors ramp mode.
Definition: fixed_modes.hpp:83
Definition: fixed_modes.hpp:109
static constexpr modes::colors::PaletteTy palette
Color palette to use.
Definition: fixed_modes.hpp:111
Forest fixed colors ramp mode.
Definition: fixed_modes.hpp:107
Single-color mode for indexable strips with palette ramp.
Definition: fixed_modes.hpp:21
static constexpr bool hasSunsetAnimation
sunset & sunrise animation on the fixed modes
Definition: fixed_modes.hpp:54
static constexpr bool hasCustomRamp
hint manager to save our custom ramp
Definition: fixed_modes.hpp:52
Definition: fixed_modes.hpp:121
static constexpr modes::colors::PaletteTy palette
Color palette to use.
Definition: fixed_modes.hpp:123
Ocean fixed colors ramp mode.
Definition: fixed_modes.hpp:119
Definition: fixed_modes.hpp:139
static constexpr modes::colors::PaletteTy palette
Color palette to use.
Definition: fixed_modes.hpp:141
Special colored palette step mode. Ideal to set a target prefered color.
Definition: fixed_modes.hpp:131
Definition: fixed_modes.hpp:97
static constexpr modes::colors::PaletteTy palette
Color palette to use.
Definition: fixed_modes.hpp:99
Party fixed colors ramp mode.
Definition: fixed_modes.hpp:95
Definition: fixed_modes.hpp:73
static constexpr modes::colors::PaletteTy palette
Color palette to use.
Definition: fixed_modes.hpp:75
Rainbow fixed colors ramp mode.
Definition: fixed_modes.hpp:65