Changing background color of active screen


I would like to change background color of the active screen when i move the slider. I don’t see the background color changes.

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?

LVGL version = 8.3
ESP32 IDF version 5.1.2
Eclipse IDE

What do you want to achieve?

Would like to change active screen background color

What have you tried so far?

Tried lv_obj_set_style_bg_color

Code to reproduce

The code block(s) should be formatted like:

static void change_color(void){
	lv_obj_t * scr = lv_scr_act();

Screenshot and/or video


You code looks good.
Are you sure this function is really called? You can add a printf("test\n") to check it.

Many thanks for your reply…
Yes i am sure the function is called, i have added serial print in that function.
ESP_LOGI(TAG, “change color called…”);
Best Regards

Hm, that’s strange. Does other parts of the UI work normally? Can it be an issue in your flush_cb?
Also, can you try running the UI in a simulator to rule out the driver issues?

The other parts work as usual, i have menu and sub menus which works fine, I have some custom symbols as well. I will try in simulator to rule out any driver issue. Many thanks for the support.
Best Regards.