6129af93f497077a994e8e41473e2bd3d6ea5e67

Author
Ryan <fauxpark@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

Rename RGB and HSV structs (#24471)

Diff

This diff is truncated to protect this page.

  1diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c
  2index 0cf0ecb401835cb4b37476d71340d19c17fa4a2f..050609263d51721bbd809b3f3ab9f4519f1673d6 100644
  3--- a/drivers/led/apa102.c
  4+++ b/drivers/led/apa102.c
  5@@ -53,8 +53,8 @@
  6         io_wait;                                          \
  7     } while (0)
  8 
  9-rgb_led_t apa102_leds[APA102_LED_COUNT];
 10-uint8_t   apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
 11+rgb_t   apa102_leds[APA102_LED_COUNT];
 12+uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
 13 
 14 static void apa102_send_byte(uint8_t byte) {
 15     APA102_SEND_BIT(byte, 7);
 16diff --git a/drivers/painter/generic/qp_surface_rgb565.c b/drivers/painter/generic/qp_surface_rgb565.c
 17index 8883ed541d826e5e7c60a67794bf16ed0e9ad205..c5b351311a0636577fcfe5cfa6eed9098011b39f 100644
 18--- a/drivers/painter/generic/qp_surface_rgb565.c
 19+++ b/drivers/painter/generic/qp_surface_rgb565.c
 20@@ -52,7 +52,7 @@ static bool qp_surface_pixdata_rgb565(painter_device_t device, const void *pixel
 21 // Pixel colour conversion
 22 static bool qp_surface_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
 23     for (int16_t i = 0; i < palette_size; ++i) {
 24-        RGB      rgb      = hsv_to_rgb_nocie((HSV){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
 25+        rgb_t    rgb      = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
 26         uint16_t rgb565   = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3);
 27         palette[i].rgb565 = __builtin_bswap16(rgb565);
 28     }
 29diff --git a/drivers/painter/tft_panel/qp_tft_panel.c b/drivers/painter/tft_panel/qp_tft_panel.c
 30index 16dba9d6a639cb7e6622932679d2dba2e556cd93..c8e33343d44472abd0e300deaa88fa3d23fa436a 100644
 31--- a/drivers/painter/tft_panel/qp_tft_panel.c
 32+++ b/drivers/painter/tft_panel/qp_tft_panel.c
 33@@ -90,7 +90,7 @@ bool qp_tft_panel_pixdata(painter_device_t device, const void *pixel_data, uint3
 34 
 35 bool qp_tft_panel_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
 36     for (int16_t i = 0; i < palette_size; ++i) {
 37-        RGB      rgb      = hsv_to_rgb_nocie((HSV){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
 38+        rgb_t    rgb      = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
 39         uint16_t rgb565   = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3);
 40         palette[i].rgb565 = __builtin_bswap16(rgb565);
 41     }
 42@@ -99,7 +99,7 @@ bool qp_tft_panel_palette_convert_rgb565_swapped(painter_device_t device, int16_
 43 
 44 bool qp_tft_panel_palette_convert_rgb888(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
 45     for (int16_t i = 0; i < palette_size; ++i) {
 46-        RGB rgb             = hsv_to_rgb_nocie((HSV){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
 47+        rgb_t rgb           = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
 48         palette[i].rgb888.r = rgb.r;
 49         palette[i].rgb888.g = rgb.g;
 50         palette[i].rgb888.b = rgb.b;
 51diff --git a/quantum/color.c b/quantum/color.c
 52index 5f264cb76fe565e8f01d425ff3aa68c98edf0fc8..93564784f0d8b33c80a23947db4cdce8fdc5f7de 100644
 53--- a/quantum/color.c
 54+++ b/quantum/color.c
 55@@ -19,8 +19,8 @@
 56 #include "progmem.h"
 57 #include "util.h"
 58 
 59-RGB hsv_to_rgb_impl(HSV hsv, bool use_cie) {
 60-    RGB      rgb;
 61+rgb_t hsv_to_rgb_impl(hsv_t hsv, bool use_cie) {
 62+    rgb_t    rgb;
 63     uint8_t  region, remainder, p, q, t;
 64     uint16_t h, s, v;
 65 
 66@@ -97,7 +97,7 @@ RGB hsv_to_rgb_impl(HSV hsv, bool use_cie) {
 67     return rgb;
 68 }
 69 
 70-RGB hsv_to_rgb(HSV hsv) {
 71+rgb_t hsv_to_rgb(hsv_t hsv) {
 72 #ifdef USE_CIE1931_CURVE
 73     return hsv_to_rgb_impl(hsv, true);
 74 #else
 75@@ -105,6 +105,6 @@ RGB hsv_to_rgb(HSV hsv) {
 76 #endif
 77 }
 78 
 79-RGB hsv_to_rgb_nocie(HSV hsv) {
 80+rgb_t hsv_to_rgb_nocie(hsv_t hsv) {
 81     return hsv_to_rgb_impl(hsv, false);
 82 }
 83diff --git a/quantum/color.h b/quantum/color.h
 84index 81a2c1e7bac1604e292fbefae092ee3424ff6bae..5c23b2533509010488d9397801d190785dc0bdf9 100644
 85--- a/quantum/color.h
 86+++ b/quantum/color.h
 87@@ -74,19 +74,24 @@
 88 
 89 // clang-format on
 90 
 91-typedef struct PACKED rgb_led_t {
 92+typedef struct PACKED rgb_t {
 93     uint8_t r;
 94     uint8_t g;
 95     uint8_t b;
 96-} rgb_led_t;
 97+} rgb_t;
 98 
 99-typedef rgb_led_t RGB;
100+// DEPRECATED
101+typedef rgb_t RGB;
102+typedef rgb_t rgb_led_t;
103 
104-typedef struct PACKED HSV {
105+typedef struct PACKED hsv_t {
106     uint8_t h;
107     uint8_t s;
108     uint8_t v;
109-} HSV;
110+} hsv_t;
111 
112-RGB hsv_to_rgb(HSV hsv);
113-RGB hsv_to_rgb_nocie(HSV hsv);
114+// DEPRECATED
115+typedef hsv_t HSV;
116+
117+rgb_t hsv_to_rgb(hsv_t hsv);
118+rgb_t hsv_to_rgb_nocie(hsv_t hsv);
119diff --git a/quantum/rgb_matrix/animations/alpha_mods_anim.h b/quantum/rgb_matrix/animations/alpha_mods_anim.h
120index 59b8381d698476908b29a96d13c7b6896d76f7be..2f76feb0fc4121c36514502b02b8b1b193fabe87 100644
121--- a/quantum/rgb_matrix/animations/alpha_mods_anim.h
122+++ b/quantum/rgb_matrix/animations/alpha_mods_anim.h
123@@ -6,10 +6,10 @@ RGB_MATRIX_EFFECT(ALPHAS_MODS)
124 bool ALPHAS_MODS(effect_params_t* params) {
125     RGB_MATRIX_USE_LIMITS(led_min, led_max);
126 
127-    HSV hsv  = rgb_matrix_config.hsv;
128-    RGB rgb1 = rgb_matrix_hsv_to_rgb(hsv);
129+    hsv_t hsv  = rgb_matrix_config.hsv;
130+    rgb_t rgb1 = rgb_matrix_hsv_to_rgb(hsv);
131     hsv.h += rgb_matrix_config.speed;
132-    RGB rgb2 = rgb_matrix_hsv_to_rgb(hsv);
133+    rgb_t rgb2 = rgb_matrix_hsv_to_rgb(hsv);
134 
135     for (uint8_t i = led_min; i < led_max; i++) {
136         RGB_MATRIX_TEST_LED_FLAGS();
137diff --git a/quantum/rgb_matrix/animations/breathing_anim.h b/quantum/rgb_matrix/animations/breathing_anim.h
138index e9a3c96e1bb851d21735ea206d602dbddee780d9..ed0c808f878e59273a7c162b7b158bde215d9a14 100644
139--- a/quantum/rgb_matrix/animations/breathing_anim.h
140+++ b/quantum/rgb_matrix/animations/breathing_anim.h
141@@ -5,10 +5,10 @@ RGB_MATRIX_EFFECT(BREATHING)
142 bool BREATHING(effect_params_t* params) {
143     RGB_MATRIX_USE_LIMITS(led_min, led_max);
144 
145-    HSV      hsv  = rgb_matrix_config.hsv;
146+    hsv_t    hsv  = rgb_matrix_config.hsv;
147     uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
148     hsv.v         = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
149-    RGB rgb       = rgb_matrix_hsv_to_rgb(hsv);
150+    rgb_t rgb     = rgb_matrix_hsv_to_rgb(hsv);
151     for (uint8_t i = led_min; i < led_max; i++) {
152         RGB_MATRIX_TEST_LED_FLAGS();
153         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
154diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
155index 06aa8b5ed5f4a5ec3022d7e4c7c948bfaefbbfa4..5ae5b193b083ac9c5bdc03e0df194dadd1b45bba 100644
156--- a/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
157+++ b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
158@@ -2,7 +2,7 @@
159 RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT)
160 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
161 
162-static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
163+static hsv_t BAND_PINWHEEL_SAT_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time) {
164     hsv.s = scale8(hsv.s - time - atan2_8(dy, dx) * 3, hsv.s);
165     return hsv;
166 }
167diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
168index bcbc31949814c72d8d5633de44755c3098e5e960..157a8c1c198d26808f4a214b8b1ea1549a36d3bd 100644
169--- a/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
170+++ b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
171@@ -2,7 +2,7 @@
172 RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL)
173 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
174 
175-static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
176+static hsv_t BAND_PINWHEEL_VAL_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time) {
177     hsv.v = scale8(hsv.v - time - atan2_8(dy, dx) * 3, hsv.v);
178     return hsv;
179 }
180diff --git a/quantum/rgb_matrix/animations/colorband_sat_anim.h b/quantum/rgb_matrix/animations/colorband_sat_anim.h
181index cb0897ad3e9ad43f421187fe5f0d8738f92806af..a0d0e6e81162eaefa99b849c37ea6a658a2cbc90 100644
182--- a/quantum/rgb_matrix/animations/colorband_sat_anim.h
183+++ b/quantum/rgb_matrix/animations/colorband_sat_anim.h
184@@ -2,7 +2,7 @@
185 RGB_MATRIX_EFFECT(BAND_SAT)
186 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
187 
188-static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) {
189+static hsv_t BAND_SAT_math(hsv_t hsv, uint8_t i, uint8_t time) {
190     int16_t s = hsv.s - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
191     hsv.s     = scale8(s < 0 ? 0 : s, hsv.s);
192     return hsv;
193diff --git a/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
194index d26eb378558ab5f8a89f5695fce86399b3eae6fd..7d2e5b326912c9585805a99b23307df0d23483fd 100644
195--- a/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
196+++ b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
197@@ -2,7 +2,7 @@
198 RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT)
199 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
200 
201-static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
202+static hsv_t BAND_SPIRAL_SAT_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
203     hsv.s = scale8(hsv.s + dist - time - atan2_8(dy, dx), hsv.s);
204     return hsv;
205 }
206diff --git a/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
207index 3ae34bb6f097c8a4c74ba6856d724dbdf90c8bc2..9cd9c084d117a79503a47a6b0dcf32dadba0707a 100644
208--- a/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
209+++ b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
210@@ -2,7 +2,7 @@
211 RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL)
212 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
213 
214-static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
215+static hsv_t BAND_SPIRAL_VAL_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
216     hsv.v = scale8(hsv.v + dist - time - atan2_8(dy, dx), hsv.v);
217     return hsv;
218 }
219diff --git a/quantum/rgb_matrix/animations/colorband_val_anim.h b/quantum/rgb_matrix/animations/colorband_val_anim.h
220index 69c29f53a3557ba1fc023ef65ce9613442e60f2f..ccffae259f90706b49f055e43793486f33364e95 100644
221--- a/quantum/rgb_matrix/animations/colorband_val_anim.h
222+++ b/quantum/rgb_matrix/animations/colorband_val_anim.h
223@@ -2,7 +2,7 @@
224 RGB_MATRIX_EFFECT(BAND_VAL)
225 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
226 
227-static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) {
228+static hsv_t BAND_VAL_math(hsv_t hsv, uint8_t i, uint8_t time) {
229     int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
230     hsv.v     = scale8(v < 0 ? 0 : v, hsv.v);
231     return hsv;
232diff --git a/quantum/rgb_matrix/animations/cycle_all_anim.h b/quantum/rgb_matrix/animations/cycle_all_anim.h
233index d8c7220d95e78ef2d42403bad96c319b3f815a4c..8fafcf8d11ec761342674a7e81256024f369de9a 100644
234--- a/quantum/rgb_matrix/animations/cycle_all_anim.h
235+++ b/quantum/rgb_matrix/animations/cycle_all_anim.h
236@@ -2,7 +2,7 @@
237 RGB_MATRIX_EFFECT(CYCLE_ALL)
238 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
239 
240-static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time) {
241+static hsv_t CYCLE_ALL_math(hsv_t hsv, uint8_t i, uint8_t time) {
242     hsv.h = time;
243     return hsv;
244 }
245diff --git a/quantum/rgb_matrix/animations/cycle_left_right_anim.h b/quantum/rgb_matrix/animations/cycle_left_right_anim.h
246index 84c2127aff9aa00db88200655bc2acc08c46c0cc..2d8871a300e07ffe12c29722a07fae15fec72a2d 100644
247--- a/quantum/rgb_matrix/animations/cycle_left_right_anim.h
248+++ b/quantum/rgb_matrix/animations/cycle_left_right_anim.h
249@@ -2,7 +2,7 @@
250 RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
251 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
252 
253-static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) {
254+static hsv_t CYCLE_LEFT_RIGHT_math(hsv_t hsv, uint8_t i, uint8_t time) {
255     hsv.h = g_led_config.point[i].x - time;
256     return hsv;
257 }
258diff --git a/quantum/rgb_matrix/animations/cycle_out_in_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_anim.h
259index 9513fe959344e84471f913fde8afaf3ba459857c..faf920a6083018b6ab5c06af121cde409c383fbb 100644
260--- a/quantum/rgb_matrix/animations/cycle_out_in_anim.h
261+++ b/quantum/rgb_matrix/animations/cycle_out_in_anim.h
262@@ -2,7 +2,7 @@
263 RGB_MATRIX_EFFECT(CYCLE_OUT_IN)
264 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
265 
266-static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
267+static hsv_t CYCLE_OUT_IN_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
268     hsv.h = 3 * dist / 2 + time;
269     return hsv;
270 }
271diff --git a/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
272index 3cca45f27a573bd9e6ea3b71bd43f8df6927dcde..4203a8ffd2be1b5c96a449241881c8483184a26f 100644
273--- a/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
274+++ b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
275@@ -2,7 +2,7 @@
276 RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL)
277 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
278 
279-static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
280+static hsv_t CYCLE_OUT_IN_DUAL_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time) {
281     dx           = (k_rgb_matrix_center.x / 2) - abs8(dx);
282     uint8_t dist = sqrt16(dx * dx + dy * dy);
283     hsv.h        = 3 * dist + time;
284diff --git a/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
285index de5993992cbe5fd9cf58ef26a4d4c068c3aa275e..d557ffeb780a37b7d0ba7aa2da4c4b9a4747a925 100644
286--- a/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
287+++ b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
288@@ -2,7 +2,7 @@
289 RGB_MATRIX_EFFECT(CYCLE_PINWHEEL)
290 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
291 
292-static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
293+static hsv_t CYCLE_PINWHEEL_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time) {
294     hsv.h = atan2_8(dy, dx) + time;
295     return hsv;
296 }
297diff --git a/quantum/rgb_matrix/animations/cycle_spiral_anim.h b/quantum/rgb_matrix/animations/cycle_spiral_anim.h
298index 904450179eb129d87ba84a82fb26a3851a3de7cc..6d7a2dc5b48b64af87204cfc794d2f181ff43474 100644
299--- a/quantum/rgb_matrix/animations/cycle_spiral_anim.h
300+++ b/quantum/rgb_matrix/animations/cycle_spiral_anim.h
301@@ -2,7 +2,7 @@
302 RGB_MATRIX_EFFECT(CYCLE_SPIRAL)
303 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
304 
305-static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
306+static hsv_t CYCLE_SPIRAL_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
307     hsv.h = dist - time - atan2_8(dy, dx);
308     return hsv;
309 }
310diff --git a/quantum/rgb_matrix/animations/cycle_up_down_anim.h b/quantum/rgb_matrix/animations/cycle_up_down_anim.h
311index dce05fecff0c0981e0d3befbe6d7bcfb23e5c57d..09c8ace46bbb436fb74af6c6e8cc530ae576cd59 100644
312--- a/quantum/rgb_matrix/animations/cycle_up_down_anim.h
313+++ b/quantum/rgb_matrix/animations/cycle_up_down_anim.h
314@@ -2,7 +2,7 @@
315 RGB_MATRIX_EFFECT(CYCLE_UP_DOWN)
316 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
317 
318-static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) {
319+static hsv_t CYCLE_UP_DOWN_math(hsv_t hsv, uint8_t i, uint8_t time) {
320     hsv.h = g_led_config.point[i].y - time;
321     return hsv;
322 }
323diff --git a/quantum/rgb_matrix/animations/dual_beacon_anim.h b/quantum/rgb_matrix/animations/dual_beacon_anim.h
324index 5585015b869454183de6f5d84cba14dedebae7c7..7279f1ce53034de20d767262065167a6c1c6cac5 100644
325--- a/quantum/rgb_matrix/animations/dual_beacon_anim.h
326+++ b/quantum/rgb_matrix/animations/dual_beacon_anim.h
327@@ -2,7 +2,7 @@
328 RGB_MATRIX_EFFECT(DUAL_BEACON)
329 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
330 
331-static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
332+static hsv_t DUAL_BEACON_math(hsv_t hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
333     hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128;
334     return hsv;
335 }
336diff --git a/quantum/rgb_matrix/animations/flower_blooming_anim.h b/quantum/rgb_matrix/animations/flower_blooming_anim.h
337index 7629fde858ca25bcce01108a2214fb91760e296e..91f70c8d520b4addd4055fb504c0bf37e8250c3a 100644
338--- a/quantum/rgb_matrix/animations/flower_blooming_anim.h
339+++ b/quantum/rgb_matrix/animations/flower_blooming_anim.h
340@@ -18,7 +18,7 @@
341 RGB_MATRIX_EFFECT(FLOWER_BLOOMING)
342 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
343 
344-typedef HSV (*flower_blooming_f)(HSV hsv, uint8_t i, uint8_t time);
345+typedef hsv_t (*flower_blooming_f)(hsv_t hsv, uint8_t i, uint8_t time);
346 
347 bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func) {
348     RGB_MATRIX_USE_LIMITS(led_min, led_max);
349@@ -27,17 +27,17 @@ bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func)
350     for (uint8_t i = led_min; i < led_max; i++) {
351         RGB_MATRIX_TEST_LED_FLAGS();
352         if (g_led_config.point[i].y > k_rgb_matrix_center.y) {
353-            RGB bgr = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
354+            rgb_t bgr = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
355             rgb_matrix_set_color(i, bgr.b, bgr.g, bgr.r);
356         } else {
357-            RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
358+            rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
359             rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
360         }
361     }
362     return rgb_matrix_check_finished_leds(led_max);
363 }
364 
365-static HSV FLOWER_BLOOMING_math(HSV hsv, uint8_t i, uint8_t time) {
366+static hsv_t FLOWER_BLOOMING_math(hsv_t hsv, uint8_t i, uint8_t time) {
367     if (g_led_config.point[i].y > k_rgb_matrix_center.y)
368         hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 + time;
369     else
370diff --git a/quantum/rgb_matrix/animations/gradient_left_right_anim.h b/quantum/rgb_matrix/animations/gradient_left_right_anim.h
371index ebb06f59f278b2da15ca15e64c182b9e246066b4..4175ab330dc3ea8517d6e47a2111782bf21bebd9 100644
372--- a/quantum/rgb_matrix/animations/gradient_left_right_anim.h
373+++ b/quantum/rgb_matrix/animations/gradient_left_right_anim.h
374@@ -5,14 +5,14 @@ RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT)
375 bool GRADIENT_LEFT_RIGHT(effect_params_t* params) {
376     RGB_MATRIX_USE_LIMITS(led_min, led_max);
377 
378-    HSV     hsv   = rgb_matrix_config.hsv;
379+    hsv_t   hsv   = rgb_matrix_config.hsv;
380     uint8_t scale = scale8(64, rgb_matrix_config.speed);
381     for (uint8_t i = led_min; i < led_max; i++) {
382         RGB_MATRIX_TEST_LED_FLAGS();
383         // The x range will be 0..224, map this to 0..7
384         // Relies on hue being 8-bit and wrapping
385-        hsv.h   = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5);
386-        RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
387+        hsv.h     = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5);
388+        rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
389         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
390     }
391     return rgb_matrix_check_finished_leds(led_max);
392diff --git a/quantum/rgb_matrix/animations/gradient_up_down_anim.h b/quantum/rgb_matrix/animations/gradient_up_down_anim.h
393index febc3919a888c1811b09141e7b7917aed4e0c64d..e3953fb035ed4d7a02694901a805d6ffb363fc9a 100644
394--- a/quantum/rgb_matrix/animations/gradient_up_down_anim.h
395+++ b/quantum/rgb_matrix/animations/gradient_up_down_anim.h
396@@ -5,14 +5,14 @@ RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN)
397 bool GRADIENT_UP_DOWN(effect_params_t* params) {
398     RGB_MATRIX_USE_LIMITS(led_min, led_max);
399 
400-    HSV     hsv   = rgb_matrix_config.hsv;
401+    hsv_t   hsv   = rgb_matrix_config.hsv;
402     uint8_t scale = scale8(64, rgb_matrix_config.speed);
403     for (uint8_t i = led_min; i < led_max; i++) {
404         RGB_MATRIX_TEST_LED_FLAGS();
405         // The y range will be 0..64, map this to 0..4
406         // Relies on hue being 8-bit and wrapping
407-        hsv.h   = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4);
408-        RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
409+        hsv.h     = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4);
410+        rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
411         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
412     }
413     return rgb_matrix_check_finished_leds(led_max);
414diff --git a/quantum/rgb_matrix/animations/hue_breathing_anim.h b/quantum/rgb_matrix/animations/hue_breathing_anim.h
415index 853776283298fb0f98ce8386ed929ec600f8157d..5316e92dbdc5b322c79bf2142f7ef5615a22c4ba 100644
416--- a/quantum/rgb_matrix/animations/hue_breathing_anim.h
417+++ b/quantum/rgb_matrix/animations/hue_breathing_anim.h
418@@ -7,10 +7,10 @@ RGB_MATRIX_EFFECT(HUE_BREATHING)
419 bool HUE_BREATHING(effect_params_t* params) {
420     RGB_MATRIX_USE_LIMITS(led_min, led_max);
421     uint8_t  huedelta = 12;
422-    HSV      hsv      = rgb_matrix_config.hsv;
423+    hsv_t    hsv      = rgb_matrix_config.hsv;
424     uint16_t time     = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
425     hsv.h             = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta);
426-    RGB rgb           = hsv_to_rgb(hsv);
427+    rgb_t rgb         = hsv_to_rgb(hsv);
428     for (uint8_t i = led_min; i < led_max; i++) {
429         RGB_MATRIX_TEST_LED_FLAGS();
430         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
431diff --git a/quantum/rgb_matrix/animations/hue_pendulum_anim.h b/quantum/rgb_matrix/animations/hue_pendulum_anim.h
432index 7d8cbcdfb2431e0559fd610c747aba7d5be13fbd..ba0a5b45a4de49f89933e77a849e51ea57443977 100644
433--- a/quantum/rgb_matrix/animations/hue_pendulum_anim.h
434+++ b/quantum/rgb_matrix/animations/hue_pendulum_anim.h
435@@ -5,7 +5,7 @@ RGB_MATRIX_EFFECT(HUE_PENDULUM)
436 // Change huedelta to adjust range of hue change. 0-255.
437 // Looks better with a low value and slow speed for subtle change.
438 // Hue Pendulum - color changes in a wave to the right before reversing direction
439-static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) {
440+static hsv_t HUE_PENDULUM_math(hsv_t hsv, uint8_t i, uint8_t time) {
441     uint8_t huedelta = 12;
442     hsv.h            = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta);
443     return hsv;
444diff --git a/quantum/rgb_matrix/animations/hue_wave_anim.h b/quantum/rgb_matrix/animations/hue_wave_anim.h
445index 81aa7e139e9af56a840d5203815a1e10b6cc164b..7b729a1816fb04fde0abbf5228271f85c6afa226 100644
446--- a/quantum/rgb_matrix/animations/hue_wave_anim.h
447+++ b/quantum/rgb_matrix/animations/hue_wave_anim.h
448@@ -5,7 +5,7 @@ RGB_MATRIX_EFFECT(HUE_WAVE)
449 // Change huedelta to adjust range of hue change. 0-255.
450 // Looks better with a low value and slow speed for subtle change.
451 // Hue Wave - color changes in a wave to the right
452-static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) {
453+static hsv_t HUE_WAVE_math(hsv_t hsv, uint8_t i, uint8_t time) {
454     uint8_t huedelta = 24;
455     hsv.h            = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta);
456     return hsv;
457diff --git a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
458index 5d3df1059e5c05c284a494fe61c8504df8da45db..2b20b0706b58fb0b7d962cbfd2c322a88467ea89 100644
459--- a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
460+++ b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
461@@ -4,8 +4,8 @@ RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS)
462 
463 static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
464     if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
465-    HSV hsv = {random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v};
466-    RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
467+    hsv_t hsv = {random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v};
468+    rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
469     rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
470 }
471 
472diff --git a/quantum/rgb_matrix/animations/pixel_flow_anim.h b/quantum/rgb_matrix/animations/pixel_flow_anim.h
473index 27567b4f3a5396d2db1a03173b7dc2f59858d261..35170f9588e5d1cc62f4cdc9fee81230b8fb7ddc 100644
474--- a/quantum/rgb_matrix/animations/pixel_flow_anim.h
475+++ b/quantum/rgb_matrix/animations/pixel_flow_anim.h
476@@ -7,7 +7,7 @@ RGB_MATRIX_EFFECT(PIXEL_FLOW)
477 
478 static bool PIXEL_FLOW(effect_params_t* params) {
479     // LED state array
480-    static RGB led[RGB_MATRIX_LED_COUNT];
481+    static rgb_t led[RGB_MATRIX_LED_COUNT];
482 
483     static uint32_t wait_timer = 0;
484     if (wait_timer > g_rgb_timer) {
485@@ -22,7 +22,7 @@ static bool PIXEL_FLOW(effect_params_t* params) {
486         // Clear LEDs and fill the state array
487         rgb_matrix_set_color_all(0, 0, 0);
488         for (uint8_t j = 0; j < RGB_MATRIX_LED_COUNT; ++j) {
489-            led[j] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
490+            led[j] = (random8() & 2) ? (rgb_t){0, 0, 0} : hsv_to_rgb((hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
491         }
492     }
493 
494@@ -39,7 +39,7 @@ static bool PIXEL_FLOW(effect_params_t* params) {
495             led[j] = led[j + 1];
496         }
497         // Fill last LED
498-        led[led_max - 1] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
499+        led[led_max - 1] = (random8() & 2) ? (rgb_t){0, 0, 0} : hsv_to_rgb((hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
500         // Set pulse timer
501         wait_timer = g_rgb_timer + interval();
502     }
503diff --git a/quantum/rgb_matrix/animations/pixel_fractal_anim.h b/quantum/rgb_matrix/animations/pixel_fractal_anim.h
504index 90a75ed321bb8942635bbc6c2977dc5fb383de65..bf5c22a64e43962026f28fa0e4846c7c0e91befb 100644
505--- a/quantum/rgb_matrix/animations/pixel_fractal_anim.h
506+++ b/quantum/rgb_matrix/animations/pixel_fractal_anim.h
507@@ -26,11 +26,11 @@ static bool PIXEL_FRACTAL(effect_params_t* params) {
508     RGB_MATRIX_USE_LIMITS(led_min, led_max);
509 
510     if (g_rgb_timer > wait_timer) {
511-        RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
512+        rgb_t rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
513         for (uint8_t h = 0; h < MATRIX_ROWS; ++h) {
514             // Light and copy columns outward
515             for (uint8_t l = 0; l < MID_COL - 1; ++l) {
516-                RGB index_rgb = led[h][l] ? (RGB){rgb.r, rgb.g, rgb.b} : (RGB){0, 0, 0};
517+                rgb_t index_rgb = led[h][l] ? (rgb_t){rgb.r, rgb.g, rgb.b} : (rgb_t){0, 0, 0};
518                 if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][l]], params->flags)) {
519                     rgb_matrix_set_color(g_led_config.matrix_co[h][l], index_rgb.r, index_rgb.g, index_rgb.b);
520                 }
521@@ -41,7 +41,7 @@ static bool PIXEL_FRACTAL(effect_params_t* params) {
522             }
523 
524             // Light both middle columns
525-            RGB index_rgb = led[h][MID_COL - 1] ? (RGB){rgb.r, rgb.g, rgb.b} : (RGB){0, 0, 0};
526+            rgb_t index_rgb = led[h][MID_COL - 1] ? (rgb_t){rgb.r, rgb.g, rgb.b} : (rgb_t){0, 0, 0};
527             if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][MID_COL - 1]], params->flags)) {
528                 rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], index_rgb.r, index_rgb.g, index_rgb.b);
529             }
530diff --git a/quantum/rgb_matrix/animations/pixel_rain_anim.h b/quantum/rgb_matrix/animations/pixel_rain_anim.h
531index 26cd73b57804c17f968cdce4a7653f8ecf1ea7af..d7f0e3bebd0756bd22dd84531a04e95f1cccc522 100644
532--- a/quantum/rgb_matrix/animations/pixel_rain_anim.h
533+++ b/quantum/rgb_matrix/animations/pixel_rain_anim.h
534@@ -16,8 +16,8 @@ static bool PIXEL_RAIN(effect_params_t* params) {
535         if (!HAS_ANY_FLAGS(g_led_config.flags[led_index], params->flags)) {
536             return;
537         }
538-        HSV hsv = (random8() & 2) ? (HSV){0, 0, 0} : (HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v};
539-        RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
540+        hsv_t hsv = (random8() & 2) ? (hsv_t){0, 0, 0} : (hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v};
541+        rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
542         rgb_matrix_set_color(led_index, rgb.r, rgb.g, rgb.b);
543         wait_timer = g_rgb_timer + interval();
544     }
545diff --git a/quantum/rgb_matrix/animations/rainbow_beacon_anim.h b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
546index bdcca5530fd46eb1bf250d155f9b7b9f711a9eb4..3c7d8e59d23669307d858c40aeee3b05eedc0c89 100644
547--- a/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
548+++ b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
549@@ -2,7 +2,7 @@
550 RGB_MATRIX_EFFECT(RAINBOW_BEACON)
551 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
552 
553-static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
554+static hsv_t RAINBOW_BEACON_math(hsv_t hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
555     hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128;
556     return hsv;
557 }
558diff --git a/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
559index f7b8f6c2f324f92b198e97e427d0bb55530ec211..309ea829758e1f725ccc113f4b113bc45a104097 100644
560--- a/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
561+++ b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
562@@ -2,7 +2,7 @@
563 RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON)
564 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
565 
566-static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) {
567+static hsv_t RAINBOW_MOVING_CHEVRON_math(hsv_t hsv, uint8_t i, uint8_t time) {
568     hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time);
569     return hsv;
570 }
571diff --git a/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
572index 91e31ea8cc0fbd4b51f85c0d883bc351fca0b87b..5d2558d492e09e64f40e744a1ab3a3965053fbd3 100644
573--- a/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
574+++ b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
575@@ -2,7 +2,7 @@
576 RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS)
577 #    ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
578 
579-static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
580+static hsv_t RAINBOW_PINWHEELS_math(hsv_t hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
581     hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128;
582     return hsv;
583 }
584diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h
585index e8e1f6de04394609856e84f23d4dcf73e31e96f7..a682156da241ec6816eaedbc9696dbe1b79bbcff 100644
586--- a/quantum/rgb_matrix/animations/raindrops_anim.h
587+++ b/quantum/rgb_matrix/animations/raindrops_anim.h
588@@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(RAINDROPS)
589 
590 static void raindrops_set_color(int i, effect_params_t* params) {
591     if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
592-    HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
593+    hsv_t hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
594 
595     // Take the shortest path between hues
596     int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
597@@ -14,8 +14,8 @@ static void raindrops_set_color(int i, effect_params_t* params) {
598         deltaH += 256;
599     }
600 
601-    hsv.h   = rgb_matrix_config.hsv.h + (deltaH * (random8() & 0x03));
602-    RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
603+    hsv.h     = rgb_matrix_config.hsv.h + (deltaH * (random8() & 0x03));
604+    rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
605     rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
606 }
607 
608diff --git a/quantum/rgb_matrix/animations/riverflow_anim.h b/quantum/rgb_matrix/animations/riverflow_anim.h
609index 195d15986db5053012ec780c1daa9ae5a3450045..737735fe83ccd06366e40eaf9a08285cee6111a9 100644
610--- a/quantum/rgb_matrix/animations/riverflow_anim.h
611+++ b/quantum/rgb_matrix/animations/riverflow_anim.h
612@@ -8,10 +8,10 @@ bool RIVERFLOW(effect_params_t* params) {
613     RGB_MATRIX_USE_LIMITS(led_min, led_max);
614     for (uint8_t i = led_min; i < led_max; i++) {
615         RGB_MATRIX_TEST_LED_FLAGS();
616-        HSV      hsv  = rgb_matrix_config.hsv;
617+        hsv_t    hsv  = rgb_matrix_config.hsv;
618         uint16_t time = scale16by8(g_rgb_timer + (i * 315), rgb_matrix_config.speed / 8);
619         hsv.v         = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
620-        RGB rgb       = rgb_matrix_hsv_to_rgb(hsv);
621+        rgb_t rgb     = rgb_matrix_hsv_to_rgb(hsv);
622         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
623     }
624 
625diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
626index 2ad0f22c287d76ec548504475d824e6ab004e468..d43f1c0d70972386d788125f0a47c6480881c500 100644
627--- a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
628+++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
629@@ -1,6 +1,6 @@
630 #pragma once
631 
632-typedef HSV (*dx_dy_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t time);
633+typedef hsv_t (*dx_dy_f)(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time);
634 
635 bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
636     RGB_MATRIX_USE_LIMITS(led_min, led_max);
637@@ -10,7 +10,7 @@ bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
638         RGB_MATRIX_TEST_LED_FLAGS();
639         int16_t dx  = g_led_config.point[i].x - k_rgb_matrix_center.x;
640         int16_t dy  = g_led_config.point[i].y - k_rgb_matrix_center.y;
641-        RGB     rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
642+        rgb_t   rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
643         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
644     }
645     return rgb_matrix_check_finished_leds(led_max);
646diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
647index bcae7c79b6b87834f0ed1b106fa94c473ba67976..29fa42a0ed6d0fd28e2fa4f33f943f5b15dac762 100644
648--- a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
649+++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
650@@ -1,6 +1,6 @@
651 #pragma once
652 
653-typedef HSV (*dx_dy_dist_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
654+typedef hsv_t (*dx_dy_dist_f)(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
655 
656 bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) {
657     RGB_MATRIX_USE_LIMITS(led_min, led_max);
658@@ -11,7 +11,7 @@ bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func)
659         int16_t dx   = g_led_config.point[i].x - k_rgb_matrix_center.x;
660         int16_t dy   = g_led_config.point[i].y - k_rgb_matrix_center.y;
661         uint8_t dist = sqrt16(dx * dx + dy * dy);
662-        RGB     rgb  = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, dist, time));
663+        rgb_t   rgb  = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, dist, time));
664         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
665     }
666     return rgb_matrix_check_finished_leds(led_max);
667diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_i.h
668index b4de2992b64a3eec547ac7afae64ce4c68747722..670fd83ebeceff882b963523c90e772b7ab59132 100644
669--- a/quantum/rgb_matrix/animations/runners/effect_runner_i.h
670+++ b/quantum/rgb_matrix/animations/runners/effect_runner_i.h
671@@ -1,6 +1,6 @@
672 #pragma once
673 
674-typedef HSV (*i_f)(HSV hsv, uint8_t i, uint8_t time);
675+typedef hsv_t (*i_f)(hsv_t hsv, uint8_t i, uint8_t time);
676 
677 bool effect_runner_i(effect_params_t* params, i_f effect_func) {
678     RGB_MATRIX_USE_LIMITS(led_min, led_max);
679@@ -8,7 +8,7 @@ bool effect_runner_i(effect_params_t* params, i_f effect_func) {
680     uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1));
681     for (uint8_t i = led_min; i < led_max; i++) {
682         RGB_MATRIX_TEST_LED_FLAGS();
683-        RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
684+        rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
685         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
686     }
687     return rgb_matrix_check_finished_leds(led_max);
688diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
689index f9584d7071912216ad7bdfcc52fb40803a027644..958db170aedb25798496d5fa603161441b050804 100644
690--- a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
691+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
692@@ -2,7 +2,7 @@
693 
694 #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
695 
696-typedef HSV (*reactive_f)(HSV hsv, uint16_t offset);
697+typedef hsv_t (*reactive_f)(hsv_t hsv, uint16_t offset);
698 
699 bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
700     RGB_MATRIX_USE_LIMITS(led_min, led_max);
701@@ -20,7 +20,7 @@ bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
702         }
703 
704         uint16_t offset = scale16by8(tick, qadd8(rgb_matrix_config.speed, 1));
705-        RGB      rgb    = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset));
706+        rgb_t    rgb    = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset));
707         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
708     }
709     return rgb_matrix_check_finished_leds(led_max);
710diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
711index 41020eb47f820d691f13659b8bb698f6e29ccd69..2e18491450a315939eebabba8ef3801f374b8f3d 100644
712--- a/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
713+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
714@@ -2,7 +2,7 @@
715 
716 #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
717 
718-typedef HSV (*reactive_splash_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
719+typedef hsv_t (*reactive_splash_f)(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
720 
721 bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) {
722     RGB_MATRIX_USE_LIMITS(led_min, led_max);
723@@ -10,8 +10,8 @@ bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, react
724     uint8_t count = g_last_hit_tracker.count;
725     for (uint8_t i = led_min; i < led_max; i++) {
726         RGB_MATRIX_TEST_LED_FLAGS();
727-        HSV hsv = rgb_matrix_config.hsv;
728-        hsv.v   = 0;
729+        hsv_t hsv = rgb_matrix_config.hsv;
730+        hsv.v     = 0;
731         for (uint8_t j = start; j < count; j++) {
732             int16_t  dx   = g_led_config.point[i].x - g_last_hit_tracker.x[j];
733             int16_t  dy   = g_led_config.point[i].y - g_last_hit_tracker.y[j];
734@@ -19,8 +19,8 @@ bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, react
735             uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], qadd8(rgb_matrix_config.speed, 1));
736             hsv           = effect_func(hsv, dx, dy, dist, tick);
737         }
738-        hsv.v   = scale8(hsv.v, rgb_matrix_config.hsv.v);
739-        RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
740+        hsv.v     = scale8(hsv.v, rgb_matrix_config.hsv.v);
741+        rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
742         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
743     }
744     return rgb_matrix_check_finished_leds(led_max);
745diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
746index 7776491d512558147a658479bcfc0b80fd154aef..b96530aa5f02cfe9ca832f7ec65466b1421b220c 100644
747--- a/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
748+++ b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
749@@ -1,6 +1,6 @@
750 #pragma once
751 
752-typedef HSV (*sin_cos_i_f)(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
753+typedef hsv_t (*sin_cos_i_f)(hsv_t hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
754 
755 bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
756     RGB_MATRIX_USE_LIMITS(led_min, led_max);
757@@ -10,7 +10,7 @@ bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
758     int8_t   sin_value = sin8(time) - 128;
759     for (uint8_t i = led_min; i < led_max; i++) {
760         RGB_MATRIX_TEST_LED_FLAGS();
761-        RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
762+        rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
763         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
764     }
765     return rgb_matrix_check_finished_leds(led_max);
766diff --git a/quantum/rgb_matrix/animations/solid_color_anim.h b/quantum/rgb_matrix/animations/solid_color_anim.h
767index c8762dcbc2ef397c5bd8a4a82ee0a0d1813231a2..82b0007df952e364c450df2eb1a81c7c18500be4 100644
768--- a/quantum/rgb_matrix/animations/solid_color_anim.h
769+++ b/quantum/rgb_matrix/animations/solid_color_anim.h
770@@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(SOLID_COLOR)
771 bool SOLID_COLOR(effect_params_t* params) {
772     RGB_MATRIX_USE_LIMITS(led_min, led_max);
773 
774-    RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
775+    rgb_t rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
776     for (uint8_t i = led_min; i < led_max; i++) {
777         RGB_MATRIX_TEST_LED_FLAGS();
778         rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
779diff --git a/quantum/rgb_matrix/animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h
780index e18ffb5f2b058faf4bacb1f819b7cbea18314b20..67f568ca385e453b53c70ebbb7f538a8a3b0a6b2 100644
781--- a/quantum/rgb_matrix/animations/solid_reactive_anim.h
782+++ b/quantum/rgb_matrix/animations/solid_reactive_anim.h
783@@ -3,7 +3,7 @@
784 RGB_MATRIX_EFFECT(SOLID_REACTIVE)
785 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
786 
787-static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) {
788+static hsv_t SOLID_REACTIVE_math(hsv_t hsv, uint16_t offset) {
789 #            ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE
790     hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4);
791 #            endif
792diff --git a/quantum/rgb_matrix/animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h
793index a18d6b03dd6bd0f61fa2275d5b4bb9228e60c60d..e52a7d8481fdd278f1b730b6f9fb752267a530f1 100644
794--- a/quantum/rgb_matrix/animations/solid_reactive_cross.h
795+++ b/quantum/rgb_matrix/animations/solid_reactive_cross.h
796@@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
797 
798 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
799 
800-static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
801+static hsv_t SOLID_REACTIVE_CROSS_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
802     uint16_t effect = tick + dist;
803     dx              = dx < 0 ? dx * -1 : dx;
804     dy              = dy < 0 ? dy * -1 : dy;
805diff --git a/quantum/rgb_matrix/animations/solid_reactive_nexus.h b/quantum/rgb_matrix/animations/solid_reactive_nexus.h
806index 53cc008616deff7656c473c558ecae186ad88d44..471a2682caab90e8789045482778a810a8005b83 100644
807--- a/quantum/rgb_matrix/animations/solid_reactive_nexus.h
808+++ b/quantum/rgb_matrix/animations/solid_reactive_nexus.h
809@@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
810 
811 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
812 
813-static HSV SOLID_REACTIVE_NEXUS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
814+static hsv_t SOLID_REACTIVE_NEXUS_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
815     uint16_t effect = tick - dist;
816     if (effect > 255) effect = 255;
817     if (dist > 72) effect = 255;
818diff --git a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
819index 7f4e48747a6ce538bef801bc34a23a3a3bebbc12..f20f1b1fb6afdc87b8ae3908dd86c45870213a6b 100644
820--- a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
821+++ b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
822@@ -3,7 +3,7 @@
823 RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
824 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
825 
826-static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) {
827+static hsv_t SOLID_REACTIVE_SIMPLE_math(hsv_t hsv, uint16_t offset) {
828 #            ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE
829     hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4);
830 #            endif
831diff --git a/quantum/rgb_matrix/animations/solid_reactive_wide.h b/quantum/rgb_matrix/animations/solid_reactive_wide.h
832index feca1266483da5531d39de723372d5b219e504a7..b780c13d27ad91bf0f2506d9ff134a0025fefd37 100644
833--- a/quantum/rgb_matrix/animations/solid_reactive_wide.h
834+++ b/quantum/rgb_matrix/animations/solid_reactive_wide.h
835@@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
836 
837 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
838 
839-static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
840+static hsv_t SOLID_REACTIVE_WIDE_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
841     uint16_t effect = tick + dist * 5;
842     if (effect > 255) effect = 255;
843 #            ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE
844diff --git a/quantum/rgb_matrix/animations/solid_splash_anim.h b/quantum/rgb_matrix/animations/solid_splash_anim.h
845index 77d6f8c5eb0c9b96cfea90bf109440bb2b0c42c4..839ab05b38770fd6b760446253bcc51b1d68fc4f 100644
846--- a/quantum/rgb_matrix/animations/solid_splash_anim.h
847+++ b/quantum/rgb_matrix/animations/solid_splash_anim.h
848@@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(SOLID_MULTISPLASH)
849 
850 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
851 
852-HSV SOLID_SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
853+hsv_t SOLID_SPLASH_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
854     uint16_t effect = tick - dist;
855     if (effect > 255) effect = 255;
856     hsv.v = qadd8(hsv.v, 255 - effect);
857diff --git a/quantum/rgb_matrix/animations/splash_anim.h b/quantum/rgb_matrix/animations/splash_anim.h
858index 06459e1b0a2efba49fb8495e9b77ecd95d72381a..a28cadb9f43e1f9e104faf7b5256325c4fb46bb8 100644
859--- a/quantum/rgb_matrix/animations/splash_anim.h
860+++ b/quantum/rgb_matrix/animations/splash_anim.h
861@@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(MULTISPLASH)
862 
863 #        ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
864 
865-HSV SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
866+hsv_t SPLASH_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
867     uint16_t effect = tick - dist;
868     if (effect > 255) effect = 255;
869     hsv.h += effect;