]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - quantum/rgb_matrix.c
Adds a method allowing to set custom colors to the rgb matrix
[qmk_firmware.git] / quantum / rgb_matrix.c
index f0c2ddfdfbba4fe7bde37f9fc54831f3bb39b4a1..1f00e9d99b479ca5e6f73f204e75df0d573d39b8 100644 (file)
@@ -903,3 +903,10 @@ void rgblight_mode(uint8_t mode) {
 uint32_t rgblight_get_mode(void) {
     return rgb_matrix_config.mode;
 }
+
+void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
+  rgb_matrix_config.hue = hue;
+  rgb_matrix_config.sat = sat;
+  rgb_matrix_config.val = val;
+  eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+}