Hello!
The by default switch color is blue as shown of indicator. I want to change the indicator color to green as shown in the image. Can you please tell me any API used lvgl v8.0 to change the switch color?
Thanks & Regards,
Amreen
Hello!
The by default switch color is blue as shown of indicator. I want to change the indicator color to green as shown in the image. Can you please tell me any API used lvgl v8.0 to change the switch color?
Thanks & Regards,
Amreen
Try something like this (change the hex code for your green):
lv_obj_set_style_bg_color(switchName, lv_color_hex(0x01a2b1), LV_PART_INDICATOR | LV_STATE_CHECKED);
Hope that helps
Thanks @elgerg. Given solution is working.
what about change the color in the not switched case?!
Thanks in advance!
PS:
I’ve solved using : lv_obj_set_style_bg_color(switch, lv_palette_darken(LV_PALETTE_GREY, 3), 0);