82 c.
R = a.
R * (1.0f - ratio) + b.
R * ratio;
83 c.
G = a.
G * (1.0f - ratio) + b.
G * ratio;
84 c.
B = a.
B * (1.0f - ratio) + b.
B * ratio;
94 return "[" + r +
", " + g +
", " + b +
"]";
Defines the RGBColor class for managing and manipulating RGB color values.
Implements a generic Kalman Filter for 1D data.
static const float MPI
Mathematical constant (3.14159265358979323846...).
A mathematical construct representing a rotation in 3D space.
Represents an RGB color and provides methods for manipulation.
String ToString()
Converts the RGBColor to a string representation.
RGBColor()
Default constructor initializes the color to black (0, 0, 0).
RGBColor HueShift(const float &hueDeg)
Shifts the hue of the color by a specified angle in degrees.
void SetColor(const uint8_t &R, const uint8_t &G, const uint8_t &B)
Sets the RGB values of the color.
RGBColor Scale(const uint8_t &maxBrightness)
Scales the brightness of the color to a maximum value.
static RGBColor InterpolateColors(const RGBColor &a, const RGBColor &b, const float &ratio)
Interpolates between two colors based on a ratio.
uint8_t B
Blue component of the color (0-255).
uint8_t G
Green component of the color (0-255).
RGBColor Add(const uint8_t &value)
Adds a value to each RGB component of the color.
uint8_t R
Red component of the color (0-255).
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
float Z
The Z-component of the 3D vector.
float X
The X-component of the 3D vector.
float Y
The Y-component of the 3D vector.