summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2024-10-13 05:00:56 +1100
committerGitHub <noreply@github.com>2024-10-12 19:00:56 +0100
commit9884e4982be942a98cf5bca9360d20cc3fca3e9d (patch)
tree2ec0af3864f1839a8896b25090f8fa7024394fdc /keyboards
parent5478051d7470efb32783b1c4080a2c3f24ce3c24 (diff)
Rename RGB/HSV structs: keyboard-level code (#24476)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/1k/keymaps/default/rgblite.h4
-rw-r--r--keyboards/bandominedoni/rgb_matrix_kb.inc4
-rw-r--r--keyboards/bastardkb/dilemma/3x5_3/3x5_3.c18
-rw-r--r--keyboards/chromatonemini/rgb_matrix_kb.inc10
-rw-r--r--keyboards/cipulot/ec_980c/ec_980c.c12
-rw-r--r--keyboards/gopolar/gg86/gg86.c4
-rw-r--r--keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c4
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h14
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/cool_diagonal.c2
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c14
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.c2
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.h6
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/kitt.c2
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c4
-rw-r--r--keyboards/horrortroll/nyx/rev1/lib/startup_swirl_anim.h10
-rw-r--r--keyboards/hs60/v1/v1.c2
-rw-r--r--keyboards/inland/kb83/kb83.c2
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c36
-rw-r--r--keyboards/mechlovin/infinity875/keymaps/default/rgb_matrix_user.inc88
-rw-r--r--keyboards/ml/gas75/keymaps/default/keymap.c4
-rw-r--r--keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c4
-rw-r--r--keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c4
-rw-r--r--keyboards/neson_design/700e/700e.c4
-rw-r--r--keyboards/neson_design/n6/n6.c4
-rw-r--r--keyboards/percent/canoe_gen2/rgb_matrix_kb.inc10
-rw-r--r--keyboards/phage_studio/pila87/pila87.c4
-rw-r--r--keyboards/rgbkb/sol3/rev1/rev1.c2
-rw-r--r--keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc2
-rw-r--r--keyboards/steelseries/prime_plus/rgblight_custom.c2
-rw-r--r--keyboards/system76/launch_1/rgb_matrix_kb.inc16
-rw-r--r--keyboards/system76/system76_ec.c4
-rw-r--r--keyboards/teleport/native/ansi/keymaps/default/keymap.c12
-rw-r--r--keyboards/teleport/native/iso/keymaps/default/keymap.c12
-rw-r--r--keyboards/teleport/native/rgb_matrix_kb.inc8
-rw-r--r--keyboards/tzarc/djinn/djinn.c2
-rw-r--r--keyboards/wekey/we27/rgb_matrix_kb.inc4
-rw-r--r--keyboards/wilba_tech/wt_mono_backlight.c4
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c48
-rw-r--r--keyboards/xelus/la_plus/rgb_matrix_kb.inc4
-rw-r--r--keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h2
-rw-r--r--keyboards/yushakobo/quick17/quick17_prefs.h2
-rw-r--r--keyboards/yushakobo/quick17/rgb_matrix_kb.inc22
42 files changed, 209 insertions, 209 deletions
diff --git a/keyboards/1k/keymaps/default/rgblite.h b/keyboards/1k/keymaps/default/rgblite.h
index b30ec26b04..217ab37956 100644
--- a/keyboards/1k/keymaps/default/rgblite.h
+++ b/keyboards/1k/keymaps/default/rgblite.h
@@ -10,7 +10,7 @@ static inline void rgblite_init(void) {
10 ws2812_init(); 10 ws2812_init();
11} 11}
12 12
13static inline void rgblite_setrgb(RGB rgb) { 13static inline void rgblite_setrgb(rgb_t rgb) {
14 ws2812_set_color_all(rgb.r, rgb.g, rgb.b); 14 ws2812_set_color_all(rgb.r, rgb.g, rgb.b);
15 ws2812_flush(); 15 ws2812_flush();
16} 16}
@@ -18,7 +18,7 @@ static inline void rgblite_setrgb(RGB rgb) {
18static void rgblite_increase_hue(void) { 18static void rgblite_increase_hue(void) {
19 static uint8_t state = 0; 19 static uint8_t state = 0;
20 20
21 HSV hsv = { 255, 255, 255 }; 21 hsv_t hsv = { 255, 255, 255 };
22 hsv.h = state; 22 hsv.h = state;
23 state = (state + 8) % 256; 23 state = (state + 8) % 256;
24 24
diff --git a/keyboards/bandominedoni/rgb_matrix_kb.inc b/keyboards/bandominedoni/rgb_matrix_kb.inc
index 77ad22c1ce..081215d78f 100644
--- a/keyboards/bandominedoni/rgb_matrix_kb.inc
+++ b/keyboards/bandominedoni/rgb_matrix_kb.inc
@@ -5,8 +5,8 @@ RGB_MATRIX_EFFECT(my_party_rocks)
5 5
6bool my_party_rocks(effect_params_t* params) { 6bool my_party_rocks(effect_params_t* params) {
7 RGB_MATRIX_USE_LIMITS(led_min, led_max); 7 RGB_MATRIX_USE_LIMITS(led_min, led_max);
8 HSV hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v}; 8 hsv_t hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v};
9 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 9 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
10 // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 10 // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
11 rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); 11 rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b);
12 return rgb_matrix_check_finished_leds(led_max); 12 return rgb_matrix_check_finished_leds(led_max);
diff --git a/keyboards/bastardkb/dilemma/3x5_3/3x5_3.c b/keyboards/bastardkb/dilemma/3x5_3/3x5_3.c
index 3decc51e84..a186139835 100644
--- a/keyboards/bastardkb/dilemma/3x5_3/3x5_3.c
+++ b/keyboards/bastardkb/dilemma/3x5_3/3x5_3.c
@@ -51,36 +51,36 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
51 51
52 uint8_t layer = get_highest_layer(layer_state); 52 uint8_t layer = get_highest_layer(layer_state);
53 if (layer > 0) { 53 if (layer > 0) {
54 HSV hsv = rgb_matrix_get_hsv(); 54 hsv_t hsv = rgb_matrix_get_hsv();
55 switch (get_highest_layer(layer_state)) { 55 switch (get_highest_layer(layer_state)) {
56 case 1: 56 case 1:
57 hsv = (HSV){HSV_BLUE}; 57 hsv = (hsv_t){HSV_BLUE};
58 break; 58 break;
59 case 2: 59 case 2:
60 hsv = (HSV){HSV_AZURE}; 60 hsv = (hsv_t){HSV_AZURE};
61 break; 61 break;
62 case 3: 62 case 3:
63 hsv = (HSV){HSV_ORANGE}; 63 hsv = (hsv_t){HSV_ORANGE};
64 break; 64 break;
65 case 4: 65 case 4:
66 hsv = (HSV){HSV_GREEN}; 66 hsv = (hsv_t){HSV_GREEN};
67 break; 67 break;
68 case 5: 68 case 5:
69 hsv = (HSV){HSV_TEAL}; 69 hsv = (hsv_t){HSV_TEAL};
70 break; 70 break;
71 case 6: 71 case 6:
72 hsv = (HSV){HSV_PURPLE}; 72 hsv = (hsv_t){HSV_PURPLE};
73 break; 73 break;
74 case 7: 74 case 7:
75 default: 75 default:
76 hsv = (HSV){HSV_RED}; 76 hsv = (hsv_t){HSV_RED};
77 break; 77 break;
78 }; 78 };
79 79
80 if (hsv.v > rgb_matrix_get_val()) { 80 if (hsv.v > rgb_matrix_get_val()) {
81 hsv.v = MIN(rgb_matrix_get_val() + 22, 255); 81 hsv.v = MIN(rgb_matrix_get_val() + 22, 255);
82 } 82 }
83 RGB rgb = hsv_to_rgb(hsv); 83 rgb_t rgb = hsv_to_rgb(hsv);
84 84
85 for (uint8_t i = led_min; i < led_max; i++) { 85 for (uint8_t i = led_min; i < led_max; i++) {
86 if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { 86 if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) {
diff --git a/keyboards/chromatonemini/rgb_matrix_kb.inc b/keyboards/chromatonemini/rgb_matrix_kb.inc
index 09877e1a31..ee9e8af427 100644
--- a/keyboards/chromatonemini/rgb_matrix_kb.inc
+++ b/keyboards/chromatonemini/rgb_matrix_kb.inc
@@ -5,7 +5,7 @@ RGB_MATRIX_EFFECT(my_party_rocks)
5 5
6# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 6# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
7 7
8static HSV my_solid_reactive_multiwide_col_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { 8static hsv_t my_solid_reactive_multiwide_col_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
9 uint16_t effect = tick + dist; 9 uint16_t effect = tick + dist;
10 dx = dx < 0 ? dx * -1 : dx; 10 dx = dx < 0 ? dx * -1 : dx;
11 dx = dx * 16 > 255 ? 255 : dx * 16; 11 dx = dx * 16 > 255 ? 255 : dx * 16;
@@ -27,7 +27,7 @@ bool my_solid_reactive_col(effect_params_t* params) {
27 uint16_t max_tick = 65535 / rgb_matrix_config.speed; 27 uint16_t max_tick = 65535 / rgb_matrix_config.speed;
28 for (uint8_t i = led_min; i < led_max; i++) { 28 for (uint8_t i = led_min; i < led_max; i++) {
29 RGB_MATRIX_TEST_LED_FLAGS(); 29 RGB_MATRIX_TEST_LED_FLAGS();
30 HSV hsv = rgb_matrix_config.hsv; 30 hsv_t hsv = rgb_matrix_config.hsv;
31 uint16_t tick = max_tick; 31 uint16_t tick = max_tick;
32 // Reverse search to find most recent key hit 32 // Reverse search to find most recent key hit
33 for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) { 33 for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
@@ -39,7 +39,7 @@ bool my_solid_reactive_col(effect_params_t* params) {
39 39
40 uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); 40 uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
41 hsv.h += qsub8(130, offset); 41 hsv.h += qsub8(130, offset);
42 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 42 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
43 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 43 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
44 } 44 }
45 return led_max < RGB_MATRIX_LED_COUNT; 45 return led_max < RGB_MATRIX_LED_COUNT;
@@ -47,8 +47,8 @@ bool my_solid_reactive_col(effect_params_t* params) {
47 47
48bool my_party_rocks(effect_params_t* params) { 48bool my_party_rocks(effect_params_t* params) {
49 RGB_MATRIX_USE_LIMITS(led_min, led_max); 49 RGB_MATRIX_USE_LIMITS(led_min, led_max);
50 HSV hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v}; 50 hsv_t hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v};
51 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 51 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
52 // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 52 // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
53 rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); 53 rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b);
54 return led_max < RGB_MATRIX_LED_COUNT; 54 return led_max < RGB_MATRIX_LED_COUNT;
diff --git a/keyboards/cipulot/ec_980c/ec_980c.c b/keyboards/cipulot/ec_980c/ec_980c.c
index 0e23c32335..49b5248745 100644
--- a/keyboards/cipulot/ec_980c/ec_980c.c
+++ b/keyboards/cipulot/ec_980c/ec_980c.c
@@ -92,24 +92,24 @@ bool rgb_matrix_indicators_kb(void) {
92 92
93 if (eeprom_ec_config.num.enabled) { 93 if (eeprom_ec_config.num.enabled) {
94 // The rgb_matrix_set_color function needs an RGB code to work, so first the indicator color is cast to an HSV value and then translated to RGB 94 // The rgb_matrix_set_color function needs an RGB code to work, so first the indicator color is cast to an HSV value and then translated to RGB
95 HSV hsv_num_indicator_color = {eeprom_ec_config.num.h, eeprom_ec_config.num.s, eeprom_ec_config.num.v}; 95 hsv_t hsv_num_indicator_color = {eeprom_ec_config.num.h, eeprom_ec_config.num.s, eeprom_ec_config.num.v};
96 RGB rgb_num_indicator_color = hsv_to_rgb(hsv_num_indicator_color); 96 rgb_t rgb_num_indicator_color = hsv_to_rgb(hsv_num_indicator_color);
97 if (host_keyboard_led_state().num_lock) 97 if (host_keyboard_led_state().num_lock)
98 rgb_matrix_set_color(NUM_INDICATOR_INDEX, rgb_num_indicator_color.r, rgb_num_indicator_color.g, rgb_num_indicator_color.b); 98 rgb_matrix_set_color(NUM_INDICATOR_INDEX, rgb_num_indicator_color.r, rgb_num_indicator_color.g, rgb_num_indicator_color.b);
99 else 99 else
100 rgb_matrix_set_color(NUM_INDICATOR_INDEX, 0, 0, 0); 100 rgb_matrix_set_color(NUM_INDICATOR_INDEX, 0, 0, 0);
101 } 101 }
102 if (eeprom_ec_config.caps.enabled) { 102 if (eeprom_ec_config.caps.enabled) {
103 HSV hsv_caps_indicator_color = {eeprom_ec_config.caps.h, eeprom_ec_config.caps.s, eeprom_ec_config.caps.v}; 103 hsv_t hsv_caps_indicator_color = {eeprom_ec_config.caps.h, eeprom_ec_config.caps.s, eeprom_ec_config.caps.v};
104 RGB rgb_caps_indicator_color = hsv_to_rgb(hsv_caps_indicator_color); 104 rgb_t rgb_caps_indicator_color = hsv_to_rgb(hsv_caps_indicator_color);
105 if (host_keyboard_led_state().caps_lock) 105 if (host_keyboard_led_state().caps_lock)
106 rgb_matrix_set_color(CAPS_INDICATOR_INDEX, rgb_caps_indicator_color.r, rgb_caps_indicator_color.g, rgb_caps_indicator_color.b); 106 rgb_matrix_set_color(CAPS_INDICATOR_INDEX, rgb_caps_indicator_color.r, rgb_caps_indicator_color.g, rgb_caps_indicator_color.b);
107 else 107 else
108 rgb_matrix_set_color(CAPS_INDICATOR_INDEX, 0, 0, 0); 108 rgb_matrix_set_color(CAPS_INDICATOR_INDEX, 0, 0, 0);
109 } 109 }
110 if (eeprom_ec_config.scroll.enabled) { 110 if (eeprom_ec_config.scroll.enabled) {
111 HSV hsv_scroll_indicator_color = {eeprom_ec_config.scroll.h, eeprom_ec_config.scroll.s, eeprom_ec_config.scroll.v}; 111 hsv_t hsv_scroll_indicator_color = {eeprom_ec_config.scroll.h, eeprom_ec_config.scroll.s, eeprom_ec_config.scroll.v};
112 RGB rgb_scroll_indicator_color = hsv_to_rgb(hsv_scroll_indicator_color); 112 rgb_t rgb_scroll_indicator_color = hsv_to_rgb(hsv_scroll_indicator_color);
113 if (host_keyboard_led_state().scroll_lock) 113 if (host_keyboard_led_state().scroll_lock)
114 rgb_matrix_set_color(SCROLL_INDICATOR_INDEX, rgb_scroll_indicator_color.r, rgb_scroll_indicator_color.g, rgb_scroll_indicator_color.b); 114 rgb_matrix_set_color(SCROLL_INDICATOR_INDEX, rgb_scroll_indicator_color.r, rgb_scroll_indicator_color.g, rgb_scroll_indicator_color.b);
115 else 115 else
diff --git a/keyboards/gopolar/gg86/gg86.c b/keyboards/gopolar/gg86/gg86.c
index 8664b234c7..52e1434f00 100644
--- a/keyboards/gopolar/gg86/gg86.c
+++ b/keyboards/gopolar/gg86/gg86.c
@@ -93,10 +93,10 @@ bool rgb_matrix_indicators_kb(void) {
93 return false; 93 return false;
94 } 94 }
95 95
96 HSV hsv = rgb_matrix_config.hsv; 96 hsv_t hsv = rgb_matrix_config.hsv;
97 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 97 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
98 hsv.h = time; 98 hsv.h = time;
99 RGB rgb = hsv_to_rgb(hsv); 99 rgb_t rgb = hsv_to_rgb(hsv);
100 100
101 if (host_keyboard_led_state().caps_lock) { 101 if (host_keyboard_led_state().caps_lock) {
102 rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b); 102 rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c
index 0413ffe808..4ad4bcd5cc 100644
--- a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c
+++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c
@@ -124,10 +124,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
124} 124}
125 125
126bool rgb_matrix_indicators_user(void) { 126bool rgb_matrix_indicators_user(void) {
127 HSV hsv = rgb_matrix_config.hsv; 127 hsv_t hsv = rgb_matrix_config.hsv;
128 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 128 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
129 hsv.h = time; 129 hsv.h = time;
130 RGB rgb = hsv_to_rgb(hsv); 130 rgb_t rgb = hsv_to_rgb(hsv);
131 131
132 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) { 132 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
133 if (host_keyboard_led_state().caps_lock) { 133 if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h
index fa6f070ed2..b68f9fa634 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h
@@ -33,14 +33,14 @@ enum layer_names {
33}; 33};
34 34
35// For CUSTOM_GRADIENT 35// For CUSTOM_GRADIENT
36HSV gradient_0 = {205, 250, 255}; 36hsv_t gradient_0 = {205, 250, 255};
37HSV gradient_100 = {140, 215, 125}; 37hsv_t gradient_100 = {140, 215, 125};
38bool reflected_gradient = false; 38bool reflected_gradient = false;
39uint8_t gp_i = 0; 39uint8_t gp_i = 0;
40 40
41typedef struct { 41typedef struct {
42 HSV gradient_0; 42 hsv_t gradient_0;
43 HSV gradient_1; 43 hsv_t gradient_1;
44 bool reflected; 44 bool reflected;
45} CUSTOM_PRESETS; 45} CUSTOM_PRESETS;
46 46
@@ -203,7 +203,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
203 return false; 203 return false;
204 case G_FLIP: 204 case G_FLIP:
205 if (record->event.pressed) { 205 if (record->event.pressed) {
206 HSV temp_color = gradient_0; 206 hsv_t temp_color = gradient_0;
207 gradient_0 = gradient_100; 207 gradient_0 = gradient_100;
208 gradient_100 = temp_color; 208 gradient_100 = temp_color;
209 } 209 }
@@ -255,10 +255,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
255bool rgb_matrix_indicators_user(void) { 255bool rgb_matrix_indicators_user(void) {
256 uint8_t side_leds_left[3] = {17, 18, 19}; 256 uint8_t side_leds_left[3] = {17, 18, 19};
257 uint8_t side_leds_right[3] = { 4, 5, 6}; 257 uint8_t side_leds_right[3] = { 4, 5, 6};
258 HSV hsv = rgb_matrix_config.hsv; 258 hsv_t hsv = rgb_matrix_config.hsv;
259 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 259 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
260 hsv.h = time; 260 hsv.h = time;
261 RGB rgb = hsv_to_rgb(hsv); 261 rgb_t rgb = hsv_to_rgb(hsv);
262 262
263 if ((rgb_matrix_get_flags() & LED_FLAG_ALL)) { 263 if ((rgb_matrix_get_flags() & LED_FLAG_ALL)) {
264 if (host_keyboard_led_state().caps_lock) { 264 if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/cool_diagonal.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/cool_diagonal.c
index a5bf960d45..d1cb624570 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/cool_diagonal.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/cool_diagonal.c
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17static HSV COOL_DIAGONAL_math(HSV hsv, uint8_t i, uint8_t time) { 17static hsv_t COOL_DIAGONAL_math(hsv_t hsv, uint8_t i, uint8_t time) {
18 hsv.h = (g_led_config.point[i].x / 4) - g_led_config.point[i].y - time; 18 hsv.h = (g_led_config.point[i].x / 4) - g_led_config.point[i].y - time;
19 return hsv; 19 return hsv;
20} 20}
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c
index af6173d250..346d079a0d 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c
@@ -14,13 +14,13 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17extern HSV gradient_0; 17extern hsv_t gradient_0;
18extern HSV gradient_100; 18extern hsv_t gradient_100;
19extern bool reflected_gradient; 19extern bool reflected_gradient;
20 20
21static HSV INTERPOLATE_HSV(float step, HSV gradient_0, HSV gradient_100) { 21static hsv_t INTERPOLATE_HSV(float step, hsv_t gradient_0, hsv_t gradient_100) {
22 uint8_t cw, ccw; 22 uint8_t cw, ccw;
23 HSV color; 23 hsv_t color;
24 24
25 cw = (gradient_0.h >= gradient_100.h) ? 255 + gradient_100.h - gradient_0.h : gradient_100.h - gradient_0.h; // Hue range is 0 to 255. 25 cw = (gradient_0.h >= gradient_100.h) ? 255 + gradient_100.h - gradient_0.h : gradient_100.h - gradient_0.h; // Hue range is 0 to 255.
26 ccw = (gradient_0.h >= gradient_100.h) ? gradient_0.h - gradient_100.h : 255 + gradient_0.h - gradient_100.h; 26 ccw = (gradient_0.h >= gradient_100.h) ? gradient_0.h - gradient_100.h : 255 + gradient_0.h - gradient_100.h;
@@ -39,7 +39,7 @@ static HSV INTERPOLATE_HSV(float step, HSV gradient_0, HSV gradient_100) {
39 return color; 39 return color;
40} 40}
41 41
42static HSV CUSTOM_GRADIENT_math(uint8_t led_x, uint8_t min_x, uint8_t max_x) { 42static hsv_t CUSTOM_GRADIENT_math(uint8_t led_x, uint8_t min_x, uint8_t max_x) {
43 float step = (float)led_x / (max_x - min_x); 43 float step = (float)led_x / (max_x - min_x);
44 float mid_gradient_pos = 0.5; 44 float mid_gradient_pos = 0.5;
45 45
@@ -64,8 +64,8 @@ static bool CUSTOM_GRADIENT(effect_params_t* params) {
64 for (uint8_t i = led_min; i < led_max; i++) { 64 for (uint8_t i = led_min; i < led_max; i++) {
65 RGB_MATRIX_TEST_LED_FLAGS(); 65 RGB_MATRIX_TEST_LED_FLAGS();
66 66
67 HSV hsv_orig = CUSTOM_GRADIENT_math(g_led_config.point[i].x, min_x, max_x); 67 hsv_t hsv_orig = CUSTOM_GRADIENT_math(g_led_config.point[i].x, min_x, max_x);
68 RGB rgb = hsv_to_rgb(hsv_orig); 68 rgb_t rgb = hsv_to_rgb(hsv_orig);
69 69
70 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 70 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
71 } 71 }
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.c
index add83149cc..33205438e8 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.c
@@ -16,7 +16,7 @@
16 16
17#include "led/flower_blooming/flower_blooming.h" 17#include "led/flower_blooming/flower_blooming.h"
18 18
19static HSV FLOWER_BLOOMING_math(HSV hsv, uint8_t i, uint8_t time) { 19static hsv_t FLOWER_BLOOMING_math(hsv_t hsv, uint8_t i, uint8_t time) {
20 if (g_led_config.point[i].y > k_rgb_matrix_center.y) 20 if (g_led_config.point[i].y > k_rgb_matrix_center.y)
21 hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 + time; 21 hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 + time;
22 else 22 else
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.h b/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.h
index 941dab975a..e699011922 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.h
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/flower_blooming/flower_blooming.h
@@ -1,6 +1,6 @@
1#pragma once 1#pragma once
2 2
3typedef HSV (*flower_blooming_f)(HSV hsv, uint8_t i, uint8_t time); 3typedef hsv_t (*flower_blooming_f)(hsv_t hsv, uint8_t i, uint8_t time);
4 4
5bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func) { 5bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func) {
6 RGB_MATRIX_USE_LIMITS(led_min, led_max); 6 RGB_MATRIX_USE_LIMITS(led_min, led_max);
@@ -9,10 +9,10 @@ bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func)
9 for (uint8_t i = led_min; i < led_max; i++) { 9 for (uint8_t i = led_min; i < led_max; i++) {
10 RGB_MATRIX_TEST_LED_FLAGS(); 10 RGB_MATRIX_TEST_LED_FLAGS();
11 if (g_led_config.point[i].y > k_rgb_matrix_center.y) { 11 if (g_led_config.point[i].y > k_rgb_matrix_center.y) {
12 RGB bgr = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); 12 rgb_t bgr = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
13 rgb_matrix_set_color(i, bgr.b, bgr.g, bgr.r); 13 rgb_matrix_set_color(i, bgr.b, bgr.g, bgr.r);
14 } else { 14 } else {
15 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); 15 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
16 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 16 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
17 } 17 }
18 } 18 }
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/kitt.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/kitt.c
index dadbe48223..e4e1637005 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/kitt.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/kitt.c
@@ -35,7 +35,7 @@ static uint8_t time_to_led(uint8_t time, uint8_t led_behind) {
35 return led; 35 return led;
36} 36}
37 37
38static HSV KITT_math(HSV hsv, uint8_t i, uint8_t time) { 38static hsv_t KITT_math(hsv_t hsv, uint8_t i, uint8_t time) {
39 39
40 // reset base effect startup 40 // reset base effect startup
41 if (i == 0) { 41 if (i == 0) {
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c
index ba1ca55faf..5550f3ee3f 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c
@@ -30,10 +30,10 @@ static void doRandom_breath_rainbow(int i, effect_params_t* params) {
30 } 30 }
31 31
32 //float val = (((float)sin8(time + offset[i]) / 256)/2.1) + .05; 32 //float val = (((float)sin8(time + offset[i]) / 256)/2.1) + .05;
33 HSV hsv = {0, 255, 255}; 33 hsv_t hsv = {0, 255, 255};
34 hsv.h = scale16by8(g_rgb_timer + offset[i], rgb_matrix_config.speed / 4) + (offset[i]*2); 34 hsv.h = scale16by8(g_rgb_timer + offset[i], rgb_matrix_config.speed / 4) + (offset[i]*2);
35 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 35 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
36 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 36 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
37 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 37 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
38} 38}
39 39
diff --git a/keyboards/horrortroll/nyx/rev1/lib/startup_swirl_anim.h b/keyboards/horrortroll/nyx/rev1/lib/startup_swirl_anim.h
index 0cd0a54a8b..c3cb316349 100644
--- a/keyboards/horrortroll/nyx/rev1/lib/startup_swirl_anim.h
+++ b/keyboards/horrortroll/nyx/rev1/lib/startup_swirl_anim.h
@@ -82,7 +82,7 @@ static void traverse_matrix(void) {
82 } 82 }
83} 83}
84 84
85static void swirl_set_color(HSV hsv) { 85static void swirl_set_color(hsv_t hsv) {
86 uint8_t index = g_led_config.matrix_co[j][i]; 86 uint8_t index = g_led_config.matrix_co[j][i];
87 87
88 if(index != NO_LED){ 88 if(index != NO_LED){
@@ -97,8 +97,8 @@ static void swirl_set_color(HSV hsv) {
97 else 97 else
98 v_values[v] = 0; 98 v_values[v] = 0;
99 } 99 }
100 hsv.v = v_values[v]; 100 hsv.v = v_values[v];
101 RGB rgb = hsv_to_rgb(hsv); 101 hsv_t rgb = hsv_to_rgb(hsv);
102 rgb_matrix_set_color(v, rgb.r, rgb.g, rgb.b); 102 rgb_matrix_set_color(v, rgb.r, rgb.g, rgb.b);
103 } 103 }
104 104
@@ -112,10 +112,10 @@ static void swirl_set_color(HSV hsv) {
112} 112}
113 113
114static bool STARTUP_SWIRL_ANIM(effect_params_t* params) { 114static bool STARTUP_SWIRL_ANIM(effect_params_t* params) {
115 HSV hsv = rgb_matrix_config.hsv; 115 hsv_t hsv = rgb_matrix_config.hsv;
116 uint8_t time = scale16by8(g_rgb_timer, qadd8(24, 1)); 116 uint8_t time = scale16by8(g_rgb_timer, qadd8(24, 1));
117 hsv.h = time; 117 hsv.h = time;
118 RGB rgb = hsv_to_rgb(hsv); 118 rgb_t rgb = hsv_to_rgb(hsv);
119 119
120 if (traverse) { 120 if (traverse) {
121 swirl_set_color(hsv); 121 swirl_set_color(hsv);
diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c
index ecb78c70d0..7c685f76b8 100644
--- a/keyboards/hs60/v1/v1.c
+++ b/keyboards/hs60/v1/v1.c
@@ -71,7 +71,7 @@ void matrix_init_kb(void) {
71 // Clear the LED colors stored in EEPROM 71 // Clear the LED colors stored in EEPROM
72 for ( int row=0; row < MATRIX_ROWS; row++ ) 72 for ( int row=0; row < MATRIX_ROWS; row++ )
73 { 73 {
74 HSV hsv; 74 hsv_t hsv;
75 for ( int column=0; column < MATRIX_COLS; column++ ) 75 for ( int column=0; column < MATRIX_COLS; column++ )
76 { 76 {
77 hsv.h = rand() & 0xFF; 77 hsv.h = rand() & 0xFF;
diff --git a/keyboards/inland/kb83/kb83.c b/keyboards/inland/kb83/kb83.c
index ace575259d..1052131a91 100644
--- a/keyboards/inland/kb83/kb83.c
+++ b/keyboards/inland/kb83/kb83.c
@@ -302,7 +302,7 @@ static uint16_t scancode = 0;
302static uint8_t alarm_cnt = 0; 302static uint8_t alarm_cnt = 0;
303static uint8_t RGB_HSV_level; 303static uint8_t RGB_HSV_level;
304 304
305HSV hsv; 305hsv_t hsv;
306 306
307void led_test(uint8_t color); 307void led_test(uint8_t color);
308void clear_eeprom(void); 308void clear_eeprom(void);
diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c
index 032745af6e..45cc6013fd 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -137,8 +137,8 @@ extern rgblight_config_t rgblight_config;
137static void testing_mode(void) 137static void testing_mode(void)
138{ 138{
139 if (timer_elapsed(animation_status.last_timer) > EFFECT_TEST_INTERVAL) { 139 if (timer_elapsed(animation_status.last_timer) > EFFECT_TEST_INTERVAL) {
140 HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; 140 hsv_t h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
141 RGB c = hsv_to_rgb(h); 141 rgb_t c = hsv_to_rgb(h);
142 //is31fl3731_set_color_all(c.r, c.g, c.b); 142 //is31fl3731_set_color_all(c.r, c.g, c.b);
143 is31fl3731_set_color_all(0, 0, 0); 143 is31fl3731_set_color_all(0, 0, 0);
144 is31fl3731_set_color(rgb_ring.outer_index+RING_OUTER_BEGIN, c.r, c.g, c.b); 144 is31fl3731_set_color(rgb_ring.outer_index+RING_OUTER_BEGIN, c.r, c.g, c.b);
@@ -184,9 +184,9 @@ static void update_effect(uint32_t max_count)
184static void ring_effect_no_1(void) 184static void ring_effect_no_1(void)
185{ 185{
186 if (need_update(EFFECT_1_INTERVAL)) { 186 if (need_update(EFFECT_1_INTERVAL)) {
187 HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; 187 hsv_t h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
188 for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) { 188 for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) {
189 RGB c = hsv_to_rgb(h); 189 rgb_t c = hsv_to_rgb(h);
190 is31fl3731_set_color(i, c.r, c.g, c.b); 190 is31fl3731_set_color(i, c.r, c.g, c.b);
191 } 191 }
192 rgblight_config.hue += EFFECT_1_HUE_STEP; 192 rgblight_config.hue += EFFECT_1_HUE_STEP;
@@ -205,8 +205,8 @@ static void ring_effect_no_2(void)
205{ 205{
206 if (need_update(EFFECT_2_INTERVAL)) { 206 if (need_update(EFFECT_2_INTERVAL)) {
207 is31fl3731_set_color_all(0, 0, 0); 207 is31fl3731_set_color_all(0, 0, 0);
208 HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; 208 hsv_t h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
209 RGB c = hsv_to_rgb(h); 209 rgb_t c = hsv_to_rgb(h);
210 210
211 is31fl3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b); 211 is31fl3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b);
212 is31fl3731_set_color(rgb_ring.led_end, c.r, c.g, c.b); 212 is31fl3731_set_color(rgb_ring.led_end, c.r, c.g, c.b);
@@ -233,13 +233,13 @@ static void ring_effect_no_3(void)
233 } 233 }
234 234
235 if (need_update(EFFECT_3_INTERVAL)) { 235 if (need_update(EFFECT_3_INTERVAL)) {
236 HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; 236 hsv_t h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
237 237
238 if (rgb_ring.led_clear) { 238 if (rgb_ring.led_clear) {
239 is31fl3731_set_color(rgb_ring.led_begin, 0, 0, 0); 239 is31fl3731_set_color(rgb_ring.led_begin, 0, 0, 0);
240 is31fl3731_set_color(rgb_ring.led_end, 0, 0, 0); 240 is31fl3731_set_color(rgb_ring.led_end, 0, 0, 0);
241 } else { 241 } else {
242 RGB c = hsv_to_rgb(h); 242 rgb_t c = hsv_to_rgb(h);
243 is31fl3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b); 243 is31fl3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b);
244 is31fl3731_set_color(rgb_ring.led_end, c.r, c.g, c.b); 244 is31fl3731_set_color(rgb_ring.led_end, c.r, c.g, c.b);
245 } 245 }
@@ -278,8 +278,8 @@ static void ring_effect_no_4(void)
278{ 278{
279 if (need_update(EFFECT_4_INTERVAL)) { 279 if (need_update(EFFECT_4_INTERVAL)) {
280 is31fl3731_set_color_all(0, 0, 0); 280 is31fl3731_set_color_all(0, 0, 0);
281 HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; 281 hsv_t h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
282 RGB c = hsv_to_rgb(h); 282 rgb_t c = hsv_to_rgb(h);
283 283
284 is31fl3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b); 284 is31fl3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b);
285 is31fl3731_set_color(rgb_ring.led_end, c.r, c.g, c.b); 285 is31fl3731_set_color(rgb_ring.led_end, c.r, c.g, c.b);
@@ -303,13 +303,13 @@ static void ring_effect_no_5(void)
303 if (need_update(EFFECT_5_INTERVAL)) { 303 if (need_update(EFFECT_5_INTERVAL)) {
304 is31fl3731_set_color_all(0, 0, 0); 304 is31fl3731_set_color_all(0, 0, 0);
305 for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) { 305 for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) {
306 HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; 306 hsv_t h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
307 RGB c = hsv_to_rgb(h); 307 rgb_t c = hsv_to_rgb(h);
308 is31fl3731_set_color(i, c.r, c.g, c.b); 308 is31fl3731_set_color(i, c.r, c.g, c.b);
309 } 309 }
310 for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) { 310 for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) {
311 HSV h = {rgblight_config.hue+EFFECT_5_HUE_STEP, rgblight_config.sat, rgblight_config.val}; 311 hsv_t h = {rgblight_config.hue+EFFECT_5_HUE_STEP, rgblight_config.sat, rgblight_config.val};
312 RGB c = hsv_to_rgb(h); 312 rgb_t c = hsv_to_rgb(h);
313 is31fl3731_set_color(i, c.r, c.g, c.b); 313 is31fl3731_set_color(i, c.r, c.g, c.b);
314 } 314 }
315 rgblight_config.hue += EFFECT_5_HUE_STEP; 315 rgblight_config.hue += EFFECT_5_HUE_STEP;
@@ -329,13 +329,13 @@ static void ring_effect_no_6(void)
329 if (need_update(EFFECT_6_INTERVAL)) { 329 if (need_update(EFFECT_6_INTERVAL)) {
330 is31fl3731_set_color_all(0, 0, 0); 330 is31fl3731_set_color_all(0, 0, 0);
331 for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) { 331 for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) {
332 HSV h = {rgblight_config.hue+i*EFFECT_I_HUE_STEP, rgblight_config.sat, rgblight_config.val}; 332 hsv_t h = {rgblight_config.hue+i*EFFECT_I_HUE_STEP, rgblight_config.sat, rgblight_config.val};
333 RGB c = hsv_to_rgb(h); 333 rgb_t c = hsv_to_rgb(h);
334 is31fl3731_set_color(i, c.r, c.g, c.b); 334 is31fl3731_set_color(i, c.r, c.g, c.b);
335 } 335 }
336 for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) { 336 for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) {
337 HSV h = {rgblight_config.hue+i*EFFECT_O_HUE_STEP, rgblight_config.sat, rgblight_config.val}; 337 hsv_t h = {rgblight_config.hue+i*EFFECT_O_HUE_STEP, rgblight_config.sat, rgblight_config.val};
338 RGB c = hsv_to_rgb(h); 338 rgb_t c = hsv_to_rgb(h);
339 is31fl3731_set_color(i, c.r, c.g, c.b); 339 is31fl3731_set_color(i, c.r, c.g, c.b);
340 } 340 }
341 rgblight_config.hue += EFFECT_I_HUE_STEP; 341 rgblight_config.hue += EFFECT_I_HUE_STEP;
diff --git a/keyboards/mechlovin/infinity875/keymaps/default/rgb_matrix_user.inc b/keyboards/mechlovin/infinity875/keymaps/default/rgb_matrix_user.inc
index 627d12bd3c..9c44fde9cc 100644
--- a/keyboards/mechlovin/infinity875/keymaps/default/rgb_matrix_user.inc
+++ b/keyboards/mechlovin/infinity875/keymaps/default/rgb_matrix_user.inc
@@ -59,7 +59,7 @@ bool effect_runner_all(effect_params_t* params, i_f effect_func) {
59 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1)); 59 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1));
60 for (uint8_t i = led_min; i < led_max; i++) { 60 for (uint8_t i = led_min; i < led_max; i++) {
61 RGB_MATRIX_TEST_LED_FLAGS(); 61 RGB_MATRIX_TEST_LED_FLAGS();
62 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); 62 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
63 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 63 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
64 } 64 }
65 return led_max < RGB_MATRIX_LED_COUNT; 65 return led_max < RGB_MATRIX_LED_COUNT;
@@ -71,7 +71,7 @@ bool effect_runner_esc(effect_params_t* params, i_f effect_func) {
71 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1)); 71 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1));
72 for (uint8_t i = led_min; i < led_max; i++) { 72 for (uint8_t i = led_min; i < led_max; i++) {
73 RGB_MATRIX_TEST_LED_FLAGS(); 73 RGB_MATRIX_TEST_LED_FLAGS();
74 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); 74 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
75 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 75 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
76 } 76 }
77 for (uint8_t i = 1; i < 18; i++) { 77 for (uint8_t i = 1; i < 18; i++) {
@@ -85,7 +85,7 @@ bool effect_runner_f13(effect_params_t* params, i_f effect_func) {
85 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1)); 85 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1));
86 for (uint8_t i = led_min; i < led_max; i++) { 86 for (uint8_t i = led_min; i < led_max; i++) {
87 RGB_MATRIX_TEST_LED_FLAGS(); 87 RGB_MATRIX_TEST_LED_FLAGS();
88 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); 88 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
89 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 89 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
90 rgb_matrix_set_color(15, 0x00, 0x00, 0x00); 90 rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
91 rgb_matrix_set_color(16, 0x00, 0x00, 0x00); 91 rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
@@ -103,7 +103,7 @@ bool effect_runner_clus(effect_params_t* params, i_f effect_func) {
103 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1)); 103 uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1));
104 for (uint8_t i = led_min; i < led_max; i++) { 104 for (uint8_t i = led_min; i < led_max; i++) {
105 RGB_MATRIX_TEST_LED_FLAGS(); 105 RGB_MATRIX_TEST_LED_FLAGS();
106 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); 106 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
107 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 107 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
108 } 108 }
109 for (uint8_t i = 0; i < 15; i++) { 109 for (uint8_t i = 0; i < 15; i++) {
@@ -120,7 +120,7 @@ bool effect_runner_dx_dy_all(effect_params_t* params, dx_dy_f effect_func) {
120 RGB_MATRIX_TEST_LED_FLAGS(); 120 RGB_MATRIX_TEST_LED_FLAGS();
121 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; 121 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
122 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; 122 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
123 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time)); 123 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
124 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 124 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
125 } 125 }
126 return led_max < RGB_MATRIX_LED_COUNT; 126 return led_max < RGB_MATRIX_LED_COUNT;
@@ -134,7 +134,7 @@ bool effect_runner_dx_dy_esc(effect_params_t* params, dx_dy_f effect_func) {
134 RGB_MATRIX_TEST_LED_FLAGS(); 134 RGB_MATRIX_TEST_LED_FLAGS();
135 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; 135 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
136 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; 136 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
137 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time)); 137 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
138 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 138 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
139 } 139 }
140 for (uint8_t i = 1; i < 18; i++) { 140 for (uint8_t i = 1; i < 18; i++) {
@@ -151,7 +151,7 @@ bool effect_runner_dx_dy_f13(effect_params_t* params, dx_dy_f effect_func) {
151 RGB_MATRIX_TEST_LED_FLAGS(); 151 RGB_MATRIX_TEST_LED_FLAGS();
152 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; 152 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
153 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; 153 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
154 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time)); 154 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
155 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 155 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
156 rgb_matrix_set_color(15, 0x00, 0x00, 0x00); 156 rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
157 rgb_matrix_set_color(16, 0x00, 0x00, 0x00); 157 rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
@@ -171,7 +171,7 @@ bool effect_runner_dx_dy_clus(effect_params_t* params, dx_dy_f effect_func) {
171 RGB_MATRIX_TEST_LED_FLAGS(); 171 RGB_MATRIX_TEST_LED_FLAGS();
172 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; 172 int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
173 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; 173 int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
174 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time)); 174 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
175 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 175 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
176 } 176 }
177 for (uint8_t i = 0; i < 15; i++) { 177 for (uint8_t i = 0; i < 15; i++) {
@@ -188,7 +188,7 @@ bool effect_runner_sin_cos_all(effect_params_t* params, sin_cos_i_f effect_func)
188 int8_t sin_value = sin8(time) - 128; 188 int8_t sin_value = sin8(time) - 128;
189 for (uint8_t i = led_min; i < led_max; i++) { 189 for (uint8_t i = led_min; i < led_max; i++) {
190 RGB_MATRIX_TEST_LED_FLAGS(); 190 RGB_MATRIX_TEST_LED_FLAGS();
191 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time)); 191 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
192 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 192 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
193 } 193 }
194 return led_max < RGB_MATRIX_LED_COUNT; 194 return led_max < RGB_MATRIX_LED_COUNT;
@@ -202,7 +202,7 @@ bool effect_runner_sin_cos_esc(effect_params_t* params, sin_cos_i_f effect_func)
202 int8_t sin_value = sin8(time) - 128; 202 int8_t sin_value = sin8(time) - 128;
203 for (uint8_t i = led_min; i < led_max; i++) { 203 for (uint8_t i = led_min; i < led_max; i++) {
204 RGB_MATRIX_TEST_LED_FLAGS(); 204 RGB_MATRIX_TEST_LED_FLAGS();
205 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time)); 205 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
206 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 206 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
207 } 207 }
208 for (uint8_t i = 1; i < 18; i++) { 208 for (uint8_t i = 1; i < 18; i++) {
@@ -219,7 +219,7 @@ bool effect_runner_sin_cos_f13(effect_params_t* params, sin_cos_i_f effect_func)
219 int8_t sin_value = sin8(time) - 128; 219 int8_t sin_value = sin8(time) - 128;
220 for (uint8_t i = led_min; i < led_max; i++) { 220 for (uint8_t i = led_min; i < led_max; i++) {
221 RGB_MATRIX_TEST_LED_FLAGS(); 221 RGB_MATRIX_TEST_LED_FLAGS();
222 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time)); 222 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
223 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 223 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
224 rgb_matrix_set_color(15, 0x00, 0x00, 0x00); 224 rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
225 rgb_matrix_set_color(16, 0x00, 0x00, 0x00); 225 rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
@@ -239,7 +239,7 @@ bool effect_runner_sin_cos_clus(effect_params_t* params, sin_cos_i_f effect_func
239 int8_t sin_value = sin8(time) - 128; 239 int8_t sin_value = sin8(time) - 128;
240 for (uint8_t i = led_min; i < led_max; i++) { 240 for (uint8_t i = led_min; i < led_max; i++) {
241 RGB_MATRIX_TEST_LED_FLAGS(); 241 RGB_MATRIX_TEST_LED_FLAGS();
242 RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time)); 242 rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
243 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 243 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
244 } 244 }
245 for (uint8_t i = 0; i < 15; i++) { 245 for (uint8_t i = 0; i < 15; i++) {
@@ -250,7 +250,7 @@ bool effect_runner_sin_cos_clus(effect_params_t* params, sin_cos_i_f effect_func
250 250
251static void raindrops_set_color_all(int i, effect_params_t* params) { 251static void raindrops_set_color_all(int i, effect_params_t* params) {
252 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; 252 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
253 HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; 253 hsv_t hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
254 254
255 // Take the shortest path between hues 255 // Take the shortest path between hues
256 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; 256 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
@@ -260,14 +260,14 @@ static void raindrops_set_color_all(int i, effect_params_t* params) {
260 deltaH += 256; 260 deltaH += 256;
261 } 261 }
262 262
263 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); 263 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03));
264 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 264 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
265 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 265 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
266} 266}
267 267
268static void raindrops_set_color_esc(int i, effect_params_t* params) { 268static void raindrops_set_color_esc(int i, effect_params_t* params) {
269 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; 269 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
270 HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; 270 hsv_t hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
271 271
272 // Take the shortest path between hues 272 // Take the shortest path between hues
273 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; 273 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
@@ -277,8 +277,8 @@ static void raindrops_set_color_esc(int i, effect_params_t* params) {
277 deltaH += 256; 277 deltaH += 256;
278 } 278 }
279 279
280 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); 280 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03));
281 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 281 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
282 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 282 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
283 for (uint8_t i = 1; i < 18; i++) { 283 for (uint8_t i = 1; i < 18; i++) {
284 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 284 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
@@ -287,7 +287,7 @@ static void raindrops_set_color_esc(int i, effect_params_t* params) {
287 287
288static void raindrops_set_color_f13(int i, effect_params_t* params) { 288static void raindrops_set_color_f13(int i, effect_params_t* params) {
289 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; 289 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
290 HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; 290 hsv_t hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
291 291
292 // Take the shortest path between hues 292 // Take the shortest path between hues
293 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; 293 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
@@ -297,8 +297,8 @@ static void raindrops_set_color_f13(int i, effect_params_t* params) {
297 deltaH += 256; 297 deltaH += 256;
298 } 298 }
299 299
300 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); 300 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03));
301 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 301 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
302 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 302 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
303 rgb_matrix_set_color(15, 0x00, 0x00, 0x00); 303 rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
304 rgb_matrix_set_color(16, 0x00, 0x00, 0x00); 304 rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
@@ -310,7 +310,7 @@ static void raindrops_set_color_f13(int i, effect_params_t* params) {
310 310
311static void raindrops_set_color_clus(int i, effect_params_t* params) { 311static void raindrops_set_color_clus(int i, effect_params_t* params) {
312 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; 312 if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
313 HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; 313 hsv_t hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
314 314
315 // Take the shortest path between hues 315 // Take the shortest path between hues
316 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; 316 int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
@@ -320,43 +320,43 @@ static void raindrops_set_color_clus(int i, effect_params_t* params) {
320 deltaH += 256; 320 deltaH += 256;
321 } 321 }
322 322
323 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); 323 hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03));
324 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 324 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
325 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 325 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
326 for (uint8_t i = 0; i < 15; i++) { 326 for (uint8_t i = 0; i < 15; i++) {
327 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 327 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
328 } 328 }
329} 329}
330 330
331static HSV BAND_VAL_CUSTOM(HSV hsv, uint8_t i, uint8_t time) { 331static hsv_t BAND_VAL_CUSTOM(hsv_t hsv, uint8_t i, uint8_t time) {
332 int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; 332 int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
333 hsv.v = scale8(v < 0 ? 0 : v, hsv.v); 333 hsv.v = scale8(v < 0 ? 0 : v, hsv.v);
334 return hsv; 334 return hsv;
335} 335}
336 336
337static HSV CYCLE_UP_DOWN_CUSTOM(HSV hsv, uint8_t i, uint8_t time) { 337static hsv_t CYCLE_UP_DOWN_CUSTOM(hsv_t hsv, uint8_t i, uint8_t time) {
338 hsv.h = g_led_config.point[i].y - time; 338 hsv.h = g_led_config.point[i].y - time;
339 return hsv; 339 return hsv;
340} 340}
341 341
342static HSV CYCLE_OUT_IN_DUAL_CUSTOM(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { 342static hsv_t CYCLE_OUT_IN_DUAL_CUSTOM(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time) {
343 dx = (k_rgb_matrix_center.x / 2) - abs8(dx); 343 dx = (k_rgb_matrix_center.x / 2) - abs8(dx);
344 uint8_t dist = sqrt16(dx * dx + dy * dy); 344 uint8_t dist = sqrt16(dx * dx + dy * dy);
345 hsv.h = 3 * dist + time; 345 hsv.h = 3 * dist + time;
346 return hsv; 346 return hsv;
347} 347}
348 348
349static HSV RAINBOW_MOVING_CHEVRON_CUSTOM(HSV hsv, uint8_t i, uint8_t time) { 349static hsv_t RAINBOW_MOVING_CHEVRON_CUSTOM(hsv_t hsv, uint8_t i, uint8_t time) {
350 hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time); 350 hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time);
351 return hsv; 351 return hsv;
352} 352}
353 353
354static HSV CYCLE_PINWHEEL_CUSTOM(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { 354static hsv_t CYCLE_PINWHEEL_CUSTOM(hsv_t hsv, int16_t dx, int16_t dy, uint8_t time) {
355 hsv.h = atan2_8(dy, dx) + time; 355 hsv.h = atan2_8(dy, dx) + time;
356 return hsv; 356 return hsv;
357} 357}
358 358
359static HSV RAINBOW_BEACON_CUSTOM(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { 359static hsv_t RAINBOW_BEACON_CUSTOM(hsv_t hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
360 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; 360 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;
361 return hsv; 361 return hsv;
362} 362}
@@ -365,8 +365,8 @@ static HSV RAINBOW_BEACON_CUSTOM(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uin
365 365
366// Solid ESC 366// Solid ESC
367static bool solid_esc(effect_params_t* params) { 367static bool solid_esc(effect_params_t* params) {
368 HSV hsv = rgb_matrix_config.hsv; 368 hsv_t hsv = rgb_matrix_config.hsv;
369 RGB rgb = hsv_to_rgb(hsv); 369 rgb_t rgb = hsv_to_rgb(hsv);
370 RGB_MATRIX_USE_LIMITS(led_min, led_max); 370 RGB_MATRIX_USE_LIMITS(led_min, led_max);
371 for (uint8_t i = led_min ; i < led_max; i++) { 371 for (uint8_t i = led_min ; i < led_max; i++) {
372 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 372 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
@@ -380,8 +380,8 @@ static bool solid_esc(effect_params_t* params) {
380 380
381// Solid F13 381// Solid F13
382static bool solid_f13(effect_params_t* params) { 382static bool solid_f13(effect_params_t* params) {
383 HSV hsv = rgb_matrix_config.hsv; 383 hsv_t hsv = rgb_matrix_config.hsv;
384 RGB rgb = hsv_to_rgb(hsv); 384 rgb_t rgb = hsv_to_rgb(hsv);
385 RGB_MATRIX_USE_LIMITS(led_min, led_max); 385 RGB_MATRIX_USE_LIMITS(led_min, led_max);
386 for (uint8_t i = led_min ; i < led_max; i++) { 386 for (uint8_t i = led_min ; i < led_max; i++) {
387 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 387 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
@@ -395,8 +395,8 @@ static bool solid_f13(effect_params_t* params) {
395 395
396// Solid cluster 396// Solid cluster
397static bool solid_clus(effect_params_t* params) { 397static bool solid_clus(effect_params_t* params) {
398 HSV hsv = rgb_matrix_config.hsv; 398 hsv_t hsv = rgb_matrix_config.hsv;
399 RGB rgb = hsv_to_rgb(hsv); 399 rgb_t rgb = hsv_to_rgb(hsv);
400 RGB_MATRIX_USE_LIMITS(led_min, led_max); 400 RGB_MATRIX_USE_LIMITS(led_min, led_max);
401 for (uint8_t i = led_min ; i < led_max; i++) { 401 for (uint8_t i = led_min ; i < led_max; i++) {
402 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 402 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
@@ -412,10 +412,10 @@ static bool solid_clus(effect_params_t* params) {
412bool breathing_all(effect_params_t* params) { 412bool breathing_all(effect_params_t* params) {
413 RGB_MATRIX_USE_LIMITS(led_min, led_max); 413 RGB_MATRIX_USE_LIMITS(led_min, led_max);
414 414
415 HSV hsv = rgb_matrix_config.hsv; 415 hsv_t hsv = rgb_matrix_config.hsv;
416 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); 416 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
417 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 417 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
418 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 418 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
419 for (uint8_t i = led_min; i < led_max; i++) { 419 for (uint8_t i = led_min; i < led_max; i++) {
420 RGB_MATRIX_TEST_LED_FLAGS(); 420 RGB_MATRIX_TEST_LED_FLAGS();
421 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 421 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
@@ -427,10 +427,10 @@ bool breathing_all(effect_params_t* params) {
427static bool breathing_esc(effect_params_t* params) { 427static bool breathing_esc(effect_params_t* params) {
428 RGB_MATRIX_USE_LIMITS(led_min, led_max); 428 RGB_MATRIX_USE_LIMITS(led_min, led_max);
429 429
430 HSV hsv = rgb_matrix_config.hsv; 430 hsv_t hsv = rgb_matrix_config.hsv;
431 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); 431 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
432 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 432 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
433 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 433 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
434 for (uint8_t i = led_min ; i < led_max; i++) { 434 for (uint8_t i = led_min ; i < led_max; i++) {
435 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 435 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
436 } 436 }
@@ -446,10 +446,10 @@ static bool breathing_esc(effect_params_t* params) {
446static bool breathing_f13(effect_params_t* params) { 446static bool breathing_f13(effect_params_t* params) {
447 RGB_MATRIX_USE_LIMITS(led_min, led_max); 447 RGB_MATRIX_USE_LIMITS(led_min, led_max);
448 448
449 HSV hsv = rgb_matrix_config.hsv; 449 hsv_t hsv = rgb_matrix_config.hsv;
450 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); 450 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
451 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 451 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
452 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 452 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
453 for (uint8_t i = led_min ; i < led_max; i++) { 453 for (uint8_t i = led_min ; i < led_max; i++) {
454 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 454 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
455 } 455 }
@@ -465,10 +465,10 @@ static bool breathing_f13(effect_params_t* params) {
465static bool breathing_clus(effect_params_t* params) { 465static bool breathing_clus(effect_params_t* params) {
466 RGB_MATRIX_USE_LIMITS(led_min, led_max); 466 RGB_MATRIX_USE_LIMITS(led_min, led_max);
467 467
468 HSV hsv = rgb_matrix_config.hsv; 468 hsv_t hsv = rgb_matrix_config.hsv;
469 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); 469 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
470 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 470 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
471 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 471 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
472 for (uint8_t i = led_min ; i < led_max; i++) { 472 for (uint8_t i = led_min ; i < led_max; i++) {
473 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 473 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
474 } 474 }
diff --git a/keyboards/ml/gas75/keymaps/default/keymap.c b/keyboards/ml/gas75/keymaps/default/keymap.c
index 085c61f2ec..8e61e104ed 100644
--- a/keyboards/ml/gas75/keymaps/default/keymap.c
+++ b/keyboards/ml/gas75/keymaps/default/keymap.c
@@ -168,10 +168,10 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
168bool rgb_matrix_indicators_user(void) { 168bool rgb_matrix_indicators_user(void) {
169 rgb_matrix_set_color(2, 0, 0, 0); 169 rgb_matrix_set_color(2, 0, 0, 0);
170 170
171 HSV hsv = rgb_matrix_config.hsv; 171 hsv_t hsv = rgb_matrix_config.hsv;
172 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 172 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
173 hsv.h = time; 173 hsv.h = time;
174 RGB rgb = hsv_to_rgb(hsv); 174 rgb_t rgb = hsv_to_rgb(hsv);
175 175
176 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) { 176 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
177 if (host_keyboard_led_state().caps_lock) { 177 if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c b/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c
index df2f0d924c..8a59f2ec9f 100644
--- a/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c
+++ b/keyboards/mss_studio/m63_rgb/keymaps/default/keymap.c
@@ -169,10 +169,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
169} 169}
170 170
171bool rgb_matrix_indicators_user(void) { 171bool rgb_matrix_indicators_user(void) {
172 HSV hsv = rgb_matrix_config.hsv; 172 hsv_t hsv = rgb_matrix_config.hsv;
173 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 173 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
174 hsv.h = time; 174 hsv.h = time;
175 RGB rgb = hsv_to_rgb(hsv); 175 rgb_t rgb = hsv_to_rgb(hsv);
176 176
177 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) { 177 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
178 if (host_keyboard_led_state().caps_lock) { 178 if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c b/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c
index 95a30994ae..c3879b2b61 100644
--- a/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c
+++ b/keyboards/mss_studio/m64_rgb/keymaps/default/keymap.c
@@ -165,10 +165,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
165} 165}
166 166
167bool rgb_matrix_indicators_user(void) { 167bool rgb_matrix_indicators_user(void) {
168 HSV hsv = rgb_matrix_config.hsv; 168 hsv_t hsv = rgb_matrix_config.hsv;
169 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 169 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
170 hsv.h = time; 170 hsv.h = time;
171 RGB rgb = hsv_to_rgb(hsv); 171 rgb_t rgb = hsv_to_rgb(hsv);
172 172
173 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) { 173 if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
174 if (host_keyboard_led_state().caps_lock) { 174 if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c
index cee22cf78d..810e311b28 100644
--- a/keyboards/neson_design/700e/700e.c
+++ b/keyboards/neson_design/700e/700e.c
@@ -103,9 +103,9 @@ static void update_ticks(void)
103static void self_testing(void) 103static void self_testing(void)
104{ 104{
105 if (timer_elapsed(rgb_state.ticks) < ST_INTERVAL) return; 105 if (timer_elapsed(rgb_state.ticks) < ST_INTERVAL) return;
106 HSV hsv = rgblight_get_hsv(); 106 hsv_t hsv = rgblight_get_hsv();
107 107
108 RGB led = hsv_to_rgb(hsv); 108 rgb_t led = hsv_to_rgb(hsv);
109 switch(rgb_state.testing) { 109 switch(rgb_state.testing) {
110 case ST_STAGE_1: 110 case ST_STAGE_1:
111 if (rgb_state.index !=0 ) { 111 if (rgb_state.index !=0 ) {
diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c
index 03bb88c40b..e4538257f1 100644
--- a/keyboards/neson_design/n6/n6.c
+++ b/keyboards/neson_design/n6/n6.c
@@ -104,12 +104,12 @@ static void update_ticks(void)
104static void self_testing(void) 104static void self_testing(void)
105{ 105{
106 if (timer_elapsed(rgb_state.ticks) < ST_INTERVAL) return; 106 if (timer_elapsed(rgb_state.ticks) < ST_INTERVAL) return;
107 HSV hsv; 107 hsv_t hsv;
108 hsv.h = rgblight_config.hue; 108 hsv.h = rgblight_config.hue;
109 hsv.s = rgblight_config.sat; 109 hsv.s = rgblight_config.sat;
110 hsv.v = rgblight_config.val; 110 hsv.v = rgblight_config.val;
111 111
112 RGB led = hsv_to_rgb(hsv); 112 rgb_t led = hsv_to_rgb(hsv);
113 switch(rgb_state.testing) { 113 switch(rgb_state.testing) {
114 case ST_STAGE_1: 114 case ST_STAGE_1:
115 if (rgb_state.index !=0 ) { 115 if (rgb_state.index !=0 ) {
diff --git a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc
index 94ff62b3a8..3839fbfe4f 100644
--- a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc
+++ b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc
@@ -22,8 +22,8 @@ RGB_MATRIX_EFFECT(indicator_static)
22#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 22#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
23 23
24static bool indicator_static(effect_params_t* params) { 24static bool indicator_static(effect_params_t* params) {
25 HSV hsv = rgb_matrix_config.hsv; 25 hsv_t hsv = rgb_matrix_config.hsv;
26 RGB rgb = hsv_to_rgb(hsv); 26 rgb_t rgb = hsv_to_rgb(hsv);
27 RGB_MATRIX_USE_LIMITS(led_min, led_max); 27 RGB_MATRIX_USE_LIMITS(led_min, led_max);
28 for (uint8_t i = led_min; i < 74; i++) { 28 for (uint8_t i = led_min; i < 74; i++) {
29 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 29 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
@@ -43,21 +43,21 @@ bool effect_runner_indicator(effect_params_t* params, i_f effect_func) {
43 rgb_matrix_set_color(i, 0x00, 0x00, 0x00); 43 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
44 } else { 44 } else {
45 RGB_MATRIX_TEST_LED_FLAGS(); 45 RGB_MATRIX_TEST_LED_FLAGS();
46 RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, (i - 74), time)); 46 rgb_t rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, (i - 74), time));
47 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 47 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
48 } 48 }
49 } 49 }
50 return rgb_matrix_check_finished_leds(led_max); 50 return rgb_matrix_check_finished_leds(led_max);
51} 51}
52 52
53static HSV indicator_gradient_math(HSV hsv, uint8_t i, uint8_t time) { 53static hsv_t indicator_gradient_math(hsv_t hsv, uint8_t i, uint8_t time) {
54 hsv.h = g_led_config.point[i].x - time; 54 hsv.h = g_led_config.point[i].x - time;
55 return hsv; 55 return hsv;
56} 56}
57 57
58bool indicator_gradient(effect_params_t* params) { return effect_runner_indicator(params, &indicator_gradient_math); } 58bool indicator_gradient(effect_params_t* params) { return effect_runner_indicator(params, &indicator_gradient_math); }
59 59
60static HSV indicator_cycle_all_math(HSV hsv, uint8_t i, uint8_t time) { 60static hsv_t indicator_cycle_all_math(hsv_t hsv, uint8_t i, uint8_t time) {
61 hsv.h = time; 61 hsv.h = time;
62 return hsv; 62 return hsv;
63} 63}
diff --git a/keyboards/phage_studio/pila87/pila87.c b/keyboards/phage_studio/pila87/pila87.c
index 8e72fb4e85..619623cc09 100644
--- a/keyboards/phage_studio/pila87/pila87.c
+++ b/keyboards/phage_studio/pila87/pila87.c
@@ -73,10 +73,10 @@ bool rgb_matrix_indicators_kb(void) {
73 return false; 73 return false;
74 } 74 }
75 75
76 HSV hsv = rgb_matrix_config.hsv; 76 hsv_t hsv = rgb_matrix_config.hsv;
77 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); 77 uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
78 hsv.h = time; 78 hsv.h = time;
79 RGB rgb = hsv_to_rgb(hsv); 79 rgb_t rgb = hsv_to_rgb(hsv);
80 80
81 if (host_keyboard_led_state().caps_lock) { 81 if (host_keyboard_led_state().caps_lock) {
82 rgb_matrix_set_color(40, rgb.r, rgb.g, rgb.b); 82 rgb_matrix_set_color(40, rgb.r, rgb.g, rgb.b);
diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c
index 89ec391f66..086ce0af01 100644
--- a/keyboards/rgbkb/sol3/rev1/rev1.c
+++ b/keyboards/rgbkb/sol3/rev1/rev1.c
@@ -27,7 +27,7 @@ const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPT
27 27
28static bool limit_lightning = true; 28static bool limit_lightning = true;
29 29
30RGB rgb_matrix_hsv_to_rgb(HSV hsv) { 30RGB rgb_matrix_hsv_to_rgb(hsv_t hsv) {
31 if (limit_lightning) hsv.v /= 2; 31 if (limit_lightning) hsv.v /= 2;
32 return hsv_to_rgb(hsv); 32 return hsv_to_rgb(hsv);
33} 33}
diff --git a/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc b/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc
index 8acb4934bc..2c635c913c 100644
--- a/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc
+++ b/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc
@@ -16,7 +16,7 @@
16RGB_MATRIX_EFFECT(RGB_TESTING) 16RGB_MATRIX_EFFECT(RGB_TESTING)
17#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 17#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
18 18
19static HSV RGB_TESTING_math(HSV hsv, uint8_t i, uint8_t time) { 19static hsv_t RGB_TESTING_math(hsv_t hsv, uint8_t i, uint8_t time) {
20 hsv.v = 255; 20 hsv.v = 255;
21 hsv.s = 255; 21 hsv.s = 255;
22 22
diff --git a/keyboards/steelseries/prime_plus/rgblight_custom.c b/keyboards/steelseries/prime_plus/rgblight_custom.c
index d2be789203..2736052587 100644
--- a/keyboards/steelseries/prime_plus/rgblight_custom.c
+++ b/keyboards/steelseries/prime_plus/rgblight_custom.c
@@ -12,7 +12,7 @@ static PWMConfig pwmCFG = {
12 .period = 256, 12 .period = 256,
13}; 13};
14 14
15rgb_led_t prime_leds[RGBLIGHT_LED_COUNT]; 15rgb_t prime_leds[RGBLIGHT_LED_COUNT];
16 16
17void init_custom(void) { 17void init_custom(void) {
18 palSetPadMode(PAL_PORT(RGB_RED_PIN), PAL_PAD(RGB_RED_PIN), PAL_MODE_ALTERNATE_PUSHPULL); 18 palSetPadMode(PAL_PORT(RGB_RED_PIN), PAL_PAD(RGB_RED_PIN), PAL_MODE_ALTERNATE_PUSHPULL);
diff --git a/keyboards/system76/launch_1/rgb_matrix_kb.inc b/keyboards/system76/launch_1/rgb_matrix_kb.inc
index f29183dde0..abde7aae19 100644
--- a/keyboards/system76/launch_1/rgb_matrix_kb.inc
+++ b/keyboards/system76/launch_1/rgb_matrix_kb.inc
@@ -46,7 +46,7 @@ static bool active_keys(effect_params_t* params) {
46 46
47 RGB_MATRIX_USE_LIMITS(led_min, led_max); 47 RGB_MATRIX_USE_LIMITS(led_min, led_max);
48 uint8_t layer = get_highest_layer(layer_state); 48 uint8_t layer = get_highest_layer(layer_state);
49 RGB rgb = hsv_to_rgb(rgb_matrix_config.hsv); 49 rgb_t rgb = hsv_to_rgb(rgb_matrix_config.hsv);
50 50
51 for (uint8_t i = led_min; i < led_max; i++) { 51 for (uint8_t i = led_min; i < led_max; i++) {
52 RGB_MATRIX_TEST_LED_FLAGS(); 52 RGB_MATRIX_TEST_LED_FLAGS();
@@ -69,7 +69,7 @@ static bool active_keys(effect_params_t* params) {
69 return led_max < RGB_MATRIX_LED_COUNT; 69 return led_max < RGB_MATRIX_LED_COUNT;
70} 70}
71 71
72RGB raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0}; 72rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0};
73 73
74static uint8_t normalize_component(uint8_t component) { 74static uint8_t normalize_component(uint8_t component) {
75 uint16_t x = (uint16_t)component; 75 uint16_t x = (uint16_t)component;
@@ -78,9 +78,9 @@ static uint8_t normalize_component(uint8_t component) {
78 return (uint8_t)x; 78 return (uint8_t)x;
79} 79}
80 80
81static RGB normalize_index(uint8_t i) { 81static rgb_t normalize_index(uint8_t i) {
82 RGB raw = raw_rgb_data[i]; 82 rgb_t raw = raw_rgb_data[i];
83 RGB rgb = { 83 rgb_t rgb = {
84 .r = normalize_component(raw.r), 84 .r = normalize_component(raw.r),
85 .g = normalize_component(raw.g), 85 .g = normalize_component(raw.g),
86 .b = normalize_component(raw.b), 86 .b = normalize_component(raw.b),
@@ -92,7 +92,7 @@ static bool raw_rgb(effect_params_t* params) {
92 RGB_MATRIX_USE_LIMITS(led_min, led_max); 92 RGB_MATRIX_USE_LIMITS(led_min, led_max);
93 for (uint8_t i = led_min; i < led_max; i++) { 93 for (uint8_t i = led_min; i < led_max; i++) {
94 RGB_MATRIX_TEST_LED_FLAGS(); 94 RGB_MATRIX_TEST_LED_FLAGS();
95 RGB rgb = normalize_index(i); 95 rgb_t rgb = normalize_index(i);
96 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 96 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
97 } 97 }
98 return led_max < RGB_MATRIX_LED_COUNT; 98 return led_max < RGB_MATRIX_LED_COUNT;
@@ -137,7 +137,7 @@ static bool unlocked(effect_params_t* params) {
137 for (uint8_t i = led_min; i < led_max; i++) { 137 for (uint8_t i = led_min; i < led_max; i++) {
138 RGB_MATRIX_TEST_LED_FLAGS(); 138 RGB_MATRIX_TEST_LED_FLAGS();
139 139
140 HSV hsv = { 140 hsv_t hsv = {
141 .h = i + unlocked_ticks, 141 .h = i + unlocked_ticks,
142 .s = 0xFF, 142 .s = 0xFF,
143 .v = 0x70, 143 .v = 0x70,
@@ -149,7 +149,7 @@ static bool unlocked(effect_params_t* params) {
149 } 149 }
150 } 150 }
151 151
152 RGB rgb = hsv_to_rgb(hsv); 152 rgb_t rgb = hsv_to_rgb(hsv);
153 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 153 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
154 } 154 }
155 return led_max < RGB_MATRIX_LED_COUNT; 155 return led_max < RGB_MATRIX_LED_COUNT;
diff --git a/keyboards/system76/system76_ec.c b/keyboards/system76/system76_ec.c
index 1b7955e19b..cce60a5dea 100644
--- a/keyboards/system76/system76_ec.c
+++ b/keyboards/system76/system76_ec.c
@@ -135,7 +135,7 @@ static enum rgb_matrix_effects mode_map[] = {
135 135
136_Static_assert(sizeof(mode_map) == MODE_LAST, "mode_map_length"); 136_Static_assert(sizeof(mode_map) == MODE_LAST, "mode_map_length");
137 137
138RGB raw_rgb_data[RGB_MATRIX_LED_COUNT]; 138rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT];
139 139
140// clang-format off 140// clang-format off
141rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT] = { 141rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT] = {
@@ -322,7 +322,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
322 if (!bootloader_unlocked) { 322 if (!bootloader_unlocked) {
323 uint8_t index = data[2]; 323 uint8_t index = data[2];
324 324
325 RGB rgb = { 325 rgb_t rgb = {
326 .r = data[3], 326 .r = data[3],
327 .g = data[4], 327 .g = data[4],
328 .b = data[5], 328 .b = data[5],
diff --git a/keyboards/teleport/native/ansi/keymaps/default/keymap.c b/keyboards/teleport/native/ansi/keymaps/default/keymap.c
index 60983df435..692aa49359 100644
--- a/keyboards/teleport/native/ansi/keymaps/default/keymap.c
+++ b/keyboards/teleport/native/ansi/keymaps/default/keymap.c
@@ -57,8 +57,8 @@ and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
57This is applied to both caps lock, and other indicator keys for layer 1 */ 57This is applied to both caps lock, and other indicator keys for layer 1 */
58 58
59bool rgb_matrix_indicators_user(void) { 59bool rgb_matrix_indicators_user(void) {
60 HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; 60 hsv_t hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
61 RGB rgb_ind = hsv_to_rgb(hsv_ind); 61 rgb_t rgb_ind = hsv_to_rgb(hsv_ind);
62 62
63 /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. 63 /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
64 This is to avoid having the LED persist on until the animation randomly refreshes it. */ 64 This is to avoid having the LED persist on until the animation randomly refreshes it. */
@@ -70,8 +70,8 @@ bool rgb_matrix_indicators_user(void) {
70 70
71 /* Sets W, A, S, D, LGUI to a different color as layer indicator */ 71 /* Sets W, A, S, D, LGUI to a different color as layer indicator */
72 if(IS_LAYER_ON(1)) { 72 if(IS_LAYER_ON(1)) {
73 HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; 73 hsv_t hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
74 RGB rgb_ind = hsv_to_rgb(hsv_ind); 74 rgb_t rgb_ind = hsv_to_rgb(hsv_ind);
75 75
76 rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); 76 rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
77 rgb_matrix_set_color(A_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); 77 rgb_matrix_set_color(A_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
@@ -85,8 +85,8 @@ bool rgb_matrix_indicators_user(void) {
85layer_state_t layer_state_set_user(layer_state_t state) { 85layer_state_t layer_state_set_user(layer_state_t state) {
86 /* If reverting to base layer (no special LED effects) and rain animation is on, set "layer 1" mods back to matrix color to avoid single key persistence*/ 86 /* If reverting to base layer (no special LED effects) and rain animation is on, set "layer 1" mods back to matrix color to avoid single key persistence*/
87 if(!IS_LAYER_ON_STATE(state, 1) && rgb_matrix_get_mode() == 10) { 87 if(!IS_LAYER_ON_STATE(state, 1) && rgb_matrix_get_mode() == 10) {
88 HSV hsv_mat = rgb_matrix_get_hsv(); 88 hsv_t hsv_mat = rgb_matrix_get_hsv();
89 RGB rgb_mat = hsv_to_rgb(hsv_mat); 89 rgb_t rgb_mat = hsv_to_rgb(hsv_mat);
90 90
91 rgb_matrix_set_color(W_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b); 91 rgb_matrix_set_color(W_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b);
92 rgb_matrix_set_color(A_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b); 92 rgb_matrix_set_color(A_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b);
diff --git a/keyboards/teleport/native/iso/keymaps/default/keymap.c b/keyboards/teleport/native/iso/keymaps/default/keymap.c
index 68105f0a02..1f226c6358 100644
--- a/keyboards/teleport/native/iso/keymaps/default/keymap.c
+++ b/keyboards/teleport/native/iso/keymaps/default/keymap.c
@@ -57,8 +57,8 @@ and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
57This is applied to both caps lock, and other indicator keys for layer 1 */ 57This is applied to both caps lock, and other indicator keys for layer 1 */
58 58
59bool rgb_matrix_indicators_user(void) { 59bool rgb_matrix_indicators_user(void) {
60 HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; 60 hsv_t hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
61 RGB rgb_ind = hsv_to_rgb(hsv_ind); 61 rgb_t rgb_ind = hsv_to_rgb(hsv_ind);
62 62
63 /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. 63 /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
64 This is to avoid having the LED persist on until the animation randomly refreshes it. */ 64 This is to avoid having the LED persist on until the animation randomly refreshes it. */
@@ -70,8 +70,8 @@ bool rgb_matrix_indicators_user(void) {
70 70
71 /* Sets W, A, S, D, LGUI to a different color as layer indicator */ 71 /* Sets W, A, S, D, LGUI to a different color as layer indicator */
72 if(IS_LAYER_ON(1)) { 72 if(IS_LAYER_ON(1)) {
73 HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; 73 hsv_t hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
74 RGB rgb_ind = hsv_to_rgb(hsv_ind); 74 rgb_t rgb_ind = hsv_to_rgb(hsv_ind);
75 75
76 rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); 76 rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
77 rgb_matrix_set_color(A_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); 77 rgb_matrix_set_color(A_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
@@ -85,8 +85,8 @@ bool rgb_matrix_indicators_user(void) {
85layer_state_t layer_state_set_user(layer_state_t state) { 85layer_state_t layer_state_set_user(layer_state_t state) {
86 /* If reverting to base layer (no special LED effects) and rain animation is on, set "layer 1" mods back to matrix color to avoid single key persistence*/ 86 /* If reverting to base layer (no special LED effects) and rain animation is on, set "layer 1" mods back to matrix color to avoid single key persistence*/
87 if(!IS_LAYER_ON_STATE(state, 1) && rgb_matrix_get_mode() == 10) { 87 if(!IS_LAYER_ON_STATE(state, 1) && rgb_matrix_get_mode() == 10) {
88 HSV hsv_mat = rgb_matrix_get_hsv(); 88 hsv_t hsv_mat = rgb_matrix_get_hsv();
89 RGB rgb_mat = hsv_to_rgb(hsv_mat); 89 rgb_t rgb_mat = hsv_to_rgb(hsv_mat);
90 90
91 rgb_matrix_set_color(W_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b); 91 rgb_matrix_set_color(W_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b);
92 rgb_matrix_set_color(A_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b); 92 rgb_matrix_set_color(A_LED_INDEX, rgb_mat.r, rgb_mat.g, rgb_mat.b);
diff --git a/keyboards/teleport/native/rgb_matrix_kb.inc b/keyboards/teleport/native/rgb_matrix_kb.inc
index 5df5312a42..383a751ee1 100644
--- a/keyboards/teleport/native/rgb_matrix_kb.inc
+++ b/keyboards/teleport/native/rgb_matrix_kb.inc
@@ -18,13 +18,13 @@ static bool SINGLE_COLOR_RAINDROPS(effect_params_t* params) {
18 } 18 }
19 19
20 // Take matrix color, add between -5 and +5 to hue, random brightness between 0 and val, set to 0 if val between 0 and 5, then write to LED 20 // Take matrix color, add between -5 and +5 to hue, random brightness between 0 and val, set to 0 if val between 0 and 5, then write to LED
21 HSV hsv = rgb_matrix_get_hsv(); 21 hsv_t hsv = rgb_matrix_get_hsv();
22 hsv.h = rgb_matrix_get_hue() - 2 + random8() % 5; 22 hsv.h = rgb_matrix_get_hue() - 2 + random8() % 5;
23 hsv.v = random8() % rgb_matrix_get_val(); 23 hsv.v = random8() % rgb_matrix_get_val();
24 if (hsv.v < 5) { 24 if (hsv.v < 5) {
25 hsv.v = 0; 25 hsv.v = 0;
26 } 26 }
27 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 27 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
28 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 28 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
29 wait_timer = g_rgb_timer + interval(); 29 wait_timer = g_rgb_timer + interval();
30 } 30 }
@@ -51,7 +51,7 @@ bool STATIC_GAME_MODE(effect_params_t* params) {
51 return; 51 return;
52 } 52 }
53 53
54 HSV hsv = rgb_matrix_get_hsv(); 54 hsv_t hsv = rgb_matrix_get_hsv();
55 55
56 switch (i) { 56 switch (i) {
57 case W_LED_INDEX: 57 case W_LED_INDEX:
@@ -92,7 +92,7 @@ bool STATIC_GAME_MODE(effect_params_t* params) {
92 break; 92 break;
93 } 93 }
94 94
95 RGB rgb = hsv_to_rgb(hsv); 95 rgb_t rgb = hsv_to_rgb(hsv);
96 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 96 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
97 } 97 }
98 98
diff --git a/keyboards/tzarc/djinn/djinn.c b/keyboards/tzarc/djinn/djinn.c
index a104710b03..9723a31a60 100644
--- a/keyboards/tzarc/djinn/djinn.c
+++ b/keyboards/tzarc/djinn/djinn.c
@@ -87,7 +87,7 @@ void keyboard_post_init_kb(void) {
87// RGB brightness scaling dependent on USBPD state 87// RGB brightness scaling dependent on USBPD state
88 88
89#if defined(RGB_MATRIX_ENABLE) 89#if defined(RGB_MATRIX_ENABLE)
90RGB rgb_matrix_hsv_to_rgb(HSV hsv) { 90rgb_t rgb_matrix_hsv_to_rgb(hsv_t hsv) {
91 float scale; 91 float scale;
92 92
93# ifdef DJINN_SUPPORTS_3A_FUSE 93# ifdef DJINN_SUPPORTS_3A_FUSE
diff --git a/keyboards/wekey/we27/rgb_matrix_kb.inc b/keyboards/wekey/we27/rgb_matrix_kb.inc
index a7eeffbbe9..167a60fb57 100644
--- a/keyboards/wekey/we27/rgb_matrix_kb.inc
+++ b/keyboards/wekey/we27/rgb_matrix_kb.inc
@@ -6,13 +6,13 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE2)
6 6
7#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 7#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
8 8
9static HSV SOLID_REACTIVE_WIDE_math2(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { 9static hsv_t SOLID_REACTIVE_WIDE_math2(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
10 uint16_t effect = tick - dist > 255 || dist > 32 ? 255 : tick - dist; 10 uint16_t effect = tick - dist > 255 || dist > 32 ? 255 : tick - dist;
11 hsv.v = qadd8(hsv.v, 255 - effect); 11 hsv.v = qadd8(hsv.v, 255 - effect);
12 return hsv; 12 return hsv;
13} 13}
14 14
15static HSV SOLID_REACTIVE_NEXUS_math2(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { 15static hsv_t SOLID_REACTIVE_NEXUS_math2(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
16 uint16_t effect = tick - dist > 255 || ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) ? 255 : tick - dist; 16 uint16_t effect = tick - dist > 255 || ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) ? 255 : tick - dist;
17 hsv.v = qadd8(hsv.v, 255 - effect); 17 hsv.v = qadd8(hsv.v, 255 - effect);
18 hsv.h = rgb_matrix_config.hsv.h + dy / 4; 18 hsv.h = rgb_matrix_config.hsv.h + dy / 4;
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c
index 1426e09fc6..01fefc8ecc 100644
--- a/keyboards/wilba_tech/wt_mono_backlight.c
+++ b/keyboards/wilba_tech/wt_mono_backlight.c
@@ -150,8 +150,8 @@ void backlight_effect_cycle_all(void)
150void backlight_effect_indicators(void) 150void backlight_effect_indicators(void)
151{ 151{
152#if defined(MONO_BACKLIGHT_WT75_A) 152#if defined(MONO_BACKLIGHT_WT75_A)
153 HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; 153 hsv_t hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness };
154 RGB rgb = hsv_to_rgb( hsv ); 154 rgb_t rgb = hsv_to_rgb( hsv );
155 // SW7,CS8 = (6*8+7) = 55 155 // SW7,CS8 = (6*8+7) = 55
156 // SW8,CS8 = (7*8+7) = 63 156 // SW8,CS8 = (7*8+7) = 63
157 // SW9,CS8 = (8*8+7) = 71 157 // SW9,CS8 = (8*8+7) = 71
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 645ee2b32a..e52d002060 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -1258,16 +1258,16 @@ void backlight_effect_all_off(void)
1258// Solid color 1258// Solid color
1259void backlight_effect_solid_color(void) 1259void backlight_effect_solid_color(void)
1260{ 1260{
1261 HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; 1261 hsv_t hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness };
1262 RGB rgb = hsv_to_rgb( hsv ); 1262 rgb_t rgb = hsv_to_rgb( hsv );
1263 backlight_set_color_all( rgb.r, rgb.g, rgb.b ); 1263 backlight_set_color_all( rgb.r, rgb.g, rgb.b );
1264} 1264}
1265 1265
1266// alphas = color1, mods = color2 1266// alphas = color1, mods = color2
1267void backlight_effect_alphas_mods(void) 1267void backlight_effect_alphas_mods(void)
1268{ 1268{
1269 RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); 1269 rgb_t rgb1 = hsv_to_rgb( (hsv_t){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } );
1270 RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); 1270 rgb_t rgb2 = hsv_to_rgb( (hsv_t){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } );
1271 bool is_alpha = false; 1271 bool is_alpha = false;
1272 for ( int row = 0; row < MATRIX_ROWS; row++ ) 1272 for ( int row = 0; row < MATRIX_ROWS; row++ )
1273 { 1273 {
@@ -1352,8 +1352,8 @@ void backlight_effect_gradient_up_down(void)
1352 int16_t s2 = g_config.color_2.s; 1352 int16_t s2 = g_config.color_2.s;
1353 int16_t deltaS = ( s2 - s1 ) / 4; 1353 int16_t deltaS = ( s2 - s1 ) / 4;
1354 1354
1355 HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; 1355 hsv_t hsv = { .h = 0, .s = 255, .v = g_config.brightness };
1356 RGB rgb; 1356 rgb_t rgb;
1357 Point point; 1357 Point point;
1358 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ ) 1358 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ )
1359 { 1359 {
@@ -1390,8 +1390,8 @@ void backlight_effect_raindrops(bool initialize)
1390 int16_t s2 = g_config.color_2.s; 1390 int16_t s2 = g_config.color_2.s;
1391 int16_t deltaS = ( s2 - s1 ) / 4; 1391 int16_t deltaS = ( s2 - s1 ) / 4;
1392 1392
1393 HSV hsv; 1393 hsv_t hsv;
1394 RGB rgb; 1394 rgb_t rgb;
1395 1395
1396 // Change one LED every tick 1396 // Change one LED every tick
1397 uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; 1397 uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255;
@@ -1431,8 +1431,8 @@ void backlight_effect_cycle_all(void)
1431#endif 1431#endif
1432 offset2 = (offset2<=63) ? (63-offset2) : 0; 1432 offset2 = (offset2<=63) ? (63-offset2) : 0;
1433 1433
1434 HSV hsv = { .h = offset+offset2, .s = 255, .v = g_config.brightness }; 1434 hsv_t hsv = { .h = offset+offset2, .s = 255, .v = g_config.brightness };
1435 RGB rgb = hsv_to_rgb( hsv ); 1435 rgb_t rgb = hsv_to_rgb( hsv );
1436 backlight_set_color( i, rgb.r, rgb.g, rgb.b ); 1436 backlight_set_color( i, rgb.r, rgb.g, rgb.b );
1437 } 1437 }
1438} 1438}
@@ -1440,8 +1440,8 @@ void backlight_effect_cycle_all(void)
1440void backlight_effect_cycle_left_right(void) 1440void backlight_effect_cycle_left_right(void)
1441{ 1441{
1442 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; 1442 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF;
1443 HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; 1443 hsv_t hsv = { .h = 0, .s = 255, .v = g_config.brightness };
1444 RGB rgb; 1444 rgb_t rgb;
1445 Point point; 1445 Point point;
1446 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ ) 1446 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ )
1447 { 1447 {
@@ -1467,8 +1467,8 @@ void backlight_effect_cycle_left_right(void)
1467void backlight_effect_cycle_up_down(void) 1467void backlight_effect_cycle_up_down(void)
1468{ 1468{
1469 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; 1469 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF;
1470 HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; 1470 hsv_t hsv = { .h = 0, .s = 255, .v = g_config.brightness };
1471 RGB rgb; 1471 rgb_t rgb;
1472 Point point; 1472 Point point;
1473 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ ) 1473 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ )
1474 { 1474 {
@@ -1493,8 +1493,8 @@ void backlight_effect_cycle_up_down(void)
1493 1493
1494void backlight_effect_jellybean_raindrops( bool initialize ) 1494void backlight_effect_jellybean_raindrops( bool initialize )
1495{ 1495{
1496 HSV hsv; 1496 hsv_t hsv;
1497 RGB rgb; 1497 rgb_t rgb;
1498 1498
1499 // Change one LED every tick 1499 // Change one LED every tick
1500 uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; 1500 uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255;
@@ -1519,8 +1519,8 @@ void backlight_effect_jellybean_raindrops( bool initialize )
1519void backlight_effect_cycle_radial1(void) 1519void backlight_effect_cycle_radial1(void)
1520{ 1520{
1521 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; 1521 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF;
1522 HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; 1522 hsv_t hsv = { .h = 0, .s = 255, .v = g_config.brightness };
1523 RGB rgb; 1523 rgb_t rgb;
1524 Point point; 1524 Point point;
1525 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ ) 1525 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ )
1526 { 1526 {
@@ -1537,8 +1537,8 @@ void backlight_effect_cycle_radial2(void)
1537{ 1537{
1538 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; 1538 uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF;
1539 1539
1540 HSV hsv = { .h = 0, .s = g_config.color_1.s, .v = g_config.brightness }; 1540 hsv_t hsv = { .h = 0, .s = g_config.color_1.s, .v = g_config.brightness };
1541 RGB rgb; 1541 rgb_t rgb;
1542 Point point; 1542 Point point;
1543 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ ) 1543 for ( int i=0; i<BACKLIGHT_LED_COUNT; i++ )
1544 { 1544 {
@@ -1559,10 +1559,10 @@ void backlight_effect_cycle_radial2(void)
1559#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) 1559#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C)
1560void backlight_effect_custom_colors(void) 1560void backlight_effect_custom_colors(void)
1561{ 1561{
1562 RGB rgb; 1562 rgb_t rgb;
1563 for ( uint8_t i = 0; i < RGB_BACKLIGHT_CUSTOM_COLORS_COUNT; i++ ) 1563 for ( uint8_t i = 0; i < RGB_BACKLIGHT_CUSTOM_COLORS_COUNT; i++ )
1564 { 1564 {
1565 HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; 1565 hsv_t hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness };
1566 rgb = hsv_to_rgb( hsv ); 1566 rgb = hsv_to_rgb( hsv );
1567 uint8_t led; 1567 uint8_t led;
1568 map_row_column_to_led( 0, i, &led ); 1568 map_row_column_to_led( 0, i, &led );
@@ -1580,8 +1580,8 @@ void backlight_effect_custom_colors(void)
1580 1580
1581void backlight_effect_indicators_set_colors( uint8_t index, HS color ) 1581void backlight_effect_indicators_set_colors( uint8_t index, HS color )
1582{ 1582{
1583 HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; 1583 hsv_t hsv = { .h = color.h, .s = color.s, .v = g_config.brightness };
1584 RGB rgb = hsv_to_rgb( hsv ); 1584 rgb_t rgb = hsv_to_rgb( hsv );
1585 if ( index == 254 ) 1585 if ( index == 254 )
1586 { 1586 {
1587 backlight_set_color_all( rgb.r, rgb.g, rgb.b ); 1587 backlight_set_color_all( rgb.r, rgb.g, rgb.b );
diff --git a/keyboards/xelus/la_plus/rgb_matrix_kb.inc b/keyboards/xelus/la_plus/rgb_matrix_kb.inc
index aee484cdb8..88dd2ab0a2 100644
--- a/keyboards/xelus/la_plus/rgb_matrix_kb.inc
+++ b/keyboards/xelus/la_plus/rgb_matrix_kb.inc
@@ -13,8 +13,8 @@ RGB_MATRIX_EFFECT(startup_animation_solid)
13 13
14static void startup_animation_setleds(effect_params_t* params, bool dots) { 14static void startup_animation_setleds(effect_params_t* params, bool dots) {
15 uint8_t factor = 5; 15 uint8_t factor = 5;
16 HSV hsv = rgb_matrix_config.hsv; 16 hsv_t hsv = rgb_matrix_config.hsv;
17 RGB rgb = rgb_matrix_hsv_to_rgb(hsv); 17 rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
18 if (dots) { 18 if (dots) {
19 rgb_matrix_set_color_all(0, 0, 0); 19 rgb_matrix_set_color_all(0, 0, 0);
20 } 20 }
diff --git a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h
index 103b228d33..0c88cd6752 100644
--- a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h
+++ b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h
@@ -8,6 +8,6 @@ static inline void rgblite_init(void) {
8} 8}
9 9
10static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { 10static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) {
11 rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; 11 rgb_t leds[RGBLIGHT_LED_COUNT] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
12 ws2812_setleds(leds, RGBLIGHT_LED_COUNT); 12 ws2812_setleds(leds, RGBLIGHT_LED_COUNT);
13} 13}
diff --git a/keyboards/yushakobo/quick17/quick17_prefs.h b/keyboards/yushakobo/quick17/quick17_prefs.h
index a498381cee..1c95e2efb9 100644
--- a/keyboards/yushakobo/quick17/quick17_prefs.h
+++ b/keyboards/yushakobo/quick17/quick17_prefs.h
@@ -27,7 +27,7 @@ enum layer_names {
27 _FN 27 _FN
28}; 28};
29 29
30#define _HSV(H, S, V) (HSV){ .h = H, .s = S, .v = V } 30#define _HSV(H, S, V) (hsv_t){ .h = H, .s = S, .v = V }
31#define _RGB(rgb) rgb.r, rgb.g, rgb.b 31#define _RGB(rgb) rgb.r, rgb.g, rgb.b
32 32
33bool input_mode(void); 33bool input_mode(void);
diff --git a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc
index 4998cce029..170cf8a8d7 100644
--- a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc
+++ b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc
@@ -52,17 +52,17 @@ const uint8_t rgb_keymaps [][RGB_MATRIX_LED_COUNT] = {
52}; 52};
53 53
54static void led_color_set(uint8_t index, uint8_t color_patterns) { 54static void led_color_set(uint8_t index, uint8_t color_patterns) {
55 HSV hsv = rgb_matrix_config.hsv; // 'quantum/color.h' 55 hsv_t hsv = rgb_matrix_config.hsv; // 'quantum/color.h'
56 RGB rgb_white = hsv_to_rgb(_HSV( 0, 0, hsv.v)); // HSV_WHITE 56 rgb_t rgb_white = hsv_to_rgb(_HSV( 0, 0, hsv.v)); // HSV_WHITE
57 RGB rgb_indc1 = hsv_to_rgb(_HSV(128, 255, hsv.v)); // HSV_TEAL 57 rgb_t rgb_indc1 = hsv_to_rgb(_HSV(128, 255, hsv.v)); // HSV_TEAL
58 RGB rgb_indc2 = hsv_to_rgb(_HSV(191, 255, hsv.v)); // HSV_PURPLE 58 rgb_t rgb_indc2 = hsv_to_rgb(_HSV(191, 255, hsv.v)); // HSV_PURPLE
59 RGB rgb_indc3 = hsv_to_rgb(_HSV( 64, 255, hsv.v)); // HSV_CHARTREUSE 59 rgb_t rgb_indc3 = hsv_to_rgb(_HSV( 64, 255, hsv.v)); // HSV_CHARTREUSE
60 RGB rgb_indc4 = hsv_to_rgb(_HSV(106, 255, hsv.v)); // HSV_SPRINGGREEN 60 rgb_t rgb_indc4 = hsv_to_rgb(_HSV(106, 255, hsv.v)); // HSV_SPRINGGREEN
61 RGB rgb_indc5 = hsv_to_rgb(_HSV(234, 128, hsv.v)); // HSV_PINK 61 rgb_t rgb_indc5 = hsv_to_rgb(_HSV(234, 128, hsv.v)); // HSV_PINK
62 RGB rgb_indc6 = hsv_to_rgb(_HSV(213, 255, hsv.v)); // HSV_MAGENTA 62 rgb_t rgb_indc6 = hsv_to_rgb(_HSV(213, 255, hsv.v)); // HSV_MAGENTA
63 RGB rgb_indc_ja = hsv_to_rgb(_HSV( 0, 255, hsv.v)); // HSV_RED 63 rgb_t rgb_indc_ja = hsv_to_rgb(_HSV( 0, 255, hsv.v)); // HSV_RED
64 RGB rgb_indc_en = hsv_to_rgb(_HSV( 85, 255, hsv.v)); // HSV_GREEN 64 rgb_t rgb_indc_en = hsv_to_rgb(_HSV( 85, 255, hsv.v)); // HSV_GREEN
65 RGB rgb_indc_win = hsv_to_rgb(_HSV(170, 255, hsv.v)); // HSV_BLUE 65 rgb_t rgb_indc_win = hsv_to_rgb(_HSV(170, 255, hsv.v)); // HSV_BLUE
66 switch(color_patterns){ 66 switch(color_patterns){
67 case BOUT: rgb_matrix_set_color(index, RGB_BLACK); break; 67 case BOUT: rgb_matrix_set_color(index, RGB_BLACK); break;
68 case _____: rgb_matrix_set_color(index, _RGB(rgb_white)); break; 68 case _____: rgb_matrix_set_color(index, _RGB(rgb_white)); break;