'QMK - RGBLIGHT underglow for ADJUST layer

I have Drop Planck rev. 6 and I managed to get it working almost the way I want. I struggle with the underglow color for ADJUST layer (LWR+RSE). I followed the manual from here: github

The relevant part of my keymap.c looks like this:

const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
    {0, 1, HSV_ORANGE},
    {1, 8, HSV_ORANGE}
);
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
    {0, 1, HSV_GREEN},
    {1, 9, HSV_GREEN}
);
const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
    {0, 1, HSV_RED},
    {1, 8, HSV_RED}
);
const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS(
    {0, 1, HSV_PURPLE},
    {1, 8, HSV_PURPLE}
);
const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS(
    {0, 1, HSV_CYAN},
    {1, 8, HSV_CYAN}
);
const rgblight_segment_t PROGMEM my_layer6_layer[] = RGBLIGHT_LAYER_SEGMENTS(
    {0, 1, HSV_BLUE},
    {1, 8, HSV_BLUE}
);


const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
    my_layer1_layer,    // Overrides base layer
    my_layer2_layer,    // Overrides other layers
    my_layer3_layer,     // Overrides other layers
    my_layer4_layer,     // Overrides other layers
    my_layer5_layer,     // Overrides other layers
    my_layer6_layer     // Overrides other layers
);

void keyboard_post_init_user(void) {
    // Enable the LED layers
    rgblight_enable_noeeprom(); // Enables RGB, without saving settings
    rgblight_sethsv_noeeprom(HSV_ORANGE);
    rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
    rgblight_layers = my_rgb_layers;
}


layer_state_t default_layer_state_set_user(layer_state_t state) {
    rgblight_set_layer_state(0, layer_state_cmp(state, _BASE));
    //return state;
    return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}

layer_state_t layer_state_set_user(layer_state_t state) {
    rgblight_set_layer_state(1, layer_state_cmp(state, _LOWER));
    rgblight_set_layer_state(2, layer_state_cmp(state, _RAISE));
    rgblight_set_layer_state(3, layer_state_cmp(state, _ADJUST));
    rgblight_set_layer_state(4, layer_state_cmp(state, _LAYER4));
    rgblight_set_layer_state(5, layer_state_cmp(state, _LAYER5));
    //return state;
    return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}

LOWER and RAISE layers as well as the other two are backlit as configured, but when I press both LWR and RSE to activate ADJUST layer, the color changes to RED (=RAISE), but the keys are working as expected. When I stop pressing either LWR or RSE, the color then changes to PURPLE (=ADJUST), but the keys are either from RAISE or LOWER respectively.

I am just beginning with QMK with very little knowledge from C, so I think I am missing something trivial and obvious, but cannot find what the issue is caused by.

I would be grateful for anything that would point me to the right direction.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source