summaryrefslogtreecommitdiffstats
path: root/quantum/rgb_matrix_animations/solid_color_anim.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgb_matrix_animations/solid_color_anim.h')
-rw-r--r--quantum/rgb_matrix_animations/solid_color_anim.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h
new file mode 100644
index 000000000..24a197beb
--- /dev/null
+++ b/quantum/rgb_matrix_animations/solid_color_anim.h
@@ -0,0 +1,14 @@
+#pragma once
+
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_solid_color(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
+ RGB rgb = hsv_to_rgb(hsv);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}