Define colors with names as option

What do you want to achieve?

Is there a potential for a feature that enables the definition of colors with assigned names for use in the Human Machine Interface (HMI), thus eliminating the necessity of using hexadecimal values each time?

Mention some use cases

the code generated for example it can be like this

#define PRINCIPAL_COLOR lv_color_hex(548625)
lv_obj_set_style_bg_color(obj , PRINCIPAL_COLOR,LV_PART_MAIN | LV_STATE_DEFAULT ); 

it would make it easy to use the same color in many objects and change it easily

For the moment you can only use LVGL’s built-in theme/style engine but meanwhile we’re working on a solution in SLS for global colours too, realization is planned for SLS-v1.3.5 release.

1 Like