FastLED 3.10.6
Loading...
Searching...
No Matches
mood_palette.h
Go to the documentation of this file.
1// mood_palette.h - turn the room's mood into a colour family.
2//
3// Warmth (from valence) picks the hue centre: cool blues and teals for a
4// sad or tense room, ambers and magentas for a happy one. Arousal picks how
5// saturated and how wide the family is: a calm room is pastel and narrow,
6// an excited one is vivid and spans more of the wheel.
7#pragma once
8
9#include "FastLED.h"
10#include "fl/stl/stdint.h"
11
12#include "ring_canvas.h"
13#include "room_sense.h"
14
15namespace mood_ring {
16
22
24MoodPalette paletteFor(const RoomSense &s, float hueDrift);
25
27RGBf paletteColor(const MoodPalette &p, float t);
28
29} // namespace mood_ring
static uint32_t t
Definition Luminova.h:55
unsigned char u8
Definition stdint.h:131
MoodPalette paletteFor(const RoomSense &s, float hueDrift)
Derive the family for this frame. Cheap; call every frame.
RGBf paletteColor(const MoodPalette &p, float t)
Colour at position t in [0, 1] along the family, at value v.
fl::u8 hueSpread
how far t=1 travels from t=0
fl::u8 hueBase
centre of the family
Everything a visual is allowed to react to.
Definition room_sense.h:31
Linear-light float pixel, nominal range [0, 1], may exceed 1 before clip.
Definition ring_canvas.h:24