It’s not a fade, it’s just a static gradient. I generated the values using this web app.
To integrate this as a custom lighting effect you need to edit two different files inside your custom keymap folder. That’s the one where your keymap.c resides. Probably ~/qmk_firmware/keyboards/gmmk/pro/ansi/keymaps/somethingyouchose
. If they don’t exist yet you need to create them and add the following:
rules.mk
RGB_MATRIX_CUSTOM_USER = yes
rgb_matrix_user.inc
// !!! DO NOT ADD #pragma once !!! //
// Step 1.
// Declare custom effects using the RGB_MATRIX_EFFECT macro
// (note the lack of semicolon after the macro!)
RGB_MATRIX_EFFECT(somethingMiami)
// Step 2.
// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool somethingMiami(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (uint8_t i = led_min; i < led_max; i++) {
rgb_matrix_set_color(i, RGB_OFF);
}
// set left sidebar
rgb_matrix_set_color(67, 255, 0, 255);
rgb_matrix_set_color(70, 182, 0, 255);
rgb_matrix_set_color(73, 109, 0, 255);
rgb_matrix_set_color(76, 36, 0, 255);
rgb_matrix_set_color(80, 0, 36, 255);
rgb_matrix_set_color(83, 0, 109, 255);
rgb_matrix_set_color(87, 0, 182, 255);
rgb_matrix_set_color(91, 0, 255, 255);
// set right sidebar
rgb_matrix_set_color(68, 255, 0, 255);
rgb_matrix_set_color(71, 182, 0, 255);
rgb_matrix_set_color(74, 109, 0, 255);
rgb_matrix_set_color(77, 36, 0, 255);
rgb_matrix_set_color(81, 0, 36, 255);
rgb_matrix_set_color(84, 0, 109, 255);
rgb_matrix_set_color(88, 0, 182, 255);
rgb_matrix_set_color(92, 0, 255, 255);
return led_max < DRIVER_LED_TOTAL;
}
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
Make sure to bind a key to RGB_MOD
in your keymap.c so you can switch through all the included effects until you finally reach your custom one.
In case I forgot something, here’s the corresponding part of the official QMK documentation.
What I’ve done is the bare minimum using custom RGB matrix effects. You can go crazy there if you find the time.