feat(color): use colors from material design

Use function instead of color macros
This commit is contained in:
Gabor Kiss-Vamosi
2021-02-23 15:03:06 +01:00
parent 8740046efc
commit cbfbcb47f9
60 changed files with 475 additions and 222 deletions

View File

@@ -14,10 +14,10 @@ static lv_obj_t * img1;
void lv_example_img_2(void)
{
/*Create 4 sliders to adjust RGB color and re-color intensity*/
red_slider = create_slider(LV_COLOR_RED);
green_slider = create_slider(LV_COLOR_LIME);
blue_slider = create_slider(LV_COLOR_BLUE);
intense_slider = create_slider(LV_COLOR_GRAY);
red_slider = create_slider(lv_color_red());
green_slider = create_slider(lv_color_green());
blue_slider = create_slider(lv_color_blue());
intense_slider = create_slider(lv_color_grey());
lv_slider_set_value(red_slider, LV_OPA_20, LV_ANIM_OFF);
lv_slider_set_value(green_slider, LV_OPA_90, LV_ANIM_OFF);

View File

@@ -15,10 +15,10 @@ void lv_example_img_4(void)
static lv_style_t style;
lv_style_init(&style);
lv_style_set_bg_color(&style, LV_COLOR_YELLOW);
lv_style_set_bg_color(&style, lv_color_yellow());
lv_style_set_bg_opa(&style, LV_OPA_COVER);
lv_style_set_img_recolor_opa(&style, LV_OPA_COVER);
lv_style_set_img_recolor(&style, LV_COLOR_BLACK);
lv_style_set_img_recolor(&style, lv_color_black());
lv_obj_t * img = lv_img_create(lv_scr_act(), NULL);
lv_obj_add_style(img, LV_PART_MAIN, LV_STATE_DEFAULT, &style);