Home
last modified time | relevance | path

Searched refs:color (Results 1 – 25 of 122) sorted by relevance

12345

/lvgl-3.4.0/src/extra/widgets/led/
Dlv_led.c71 void lv_led_set_color(lv_obj_t * obj, lv_color_t color) in lv_led_set_color() argument
76 led->color = color; in lv_led_set_color()
154 led->color = lv_theme_get_color_primary(obj); in lv_led_constructor()
181 rect_dsc.bg_grad.stops[0].color = lv_color_mix(led->color, lv_color_black(), in lv_led_event()
182 … lv_color_brightness(rect_dsc.bg_grad.stops[0].color)); in lv_led_event()
183 rect_dsc.bg_grad.stops[1].color = lv_color_mix(led->color, lv_color_black(), in lv_led_event()
184 … lv_color_brightness(rect_dsc.bg_grad.stops[1].color)); in lv_led_event()
185 …rect_dsc.shadow_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.sh… in lv_led_event()
186 …rect_dsc.border_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.bo… in lv_led_event()
187 …rect_dsc.outline_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.o… in lv_led_event()
[all …]
/lvgl-3.4.0/docs/overview/
Dcolor.md3 :github_url: |github_link_base|/overview/color.md
7 The color module handles all color-related functions like changing color depth, creating colors fro…
9 The type `lv_color_t` is used to store a color. Its fields are set according to `LV_COLOR_DEPTH` in…
40 lv_color_hsv_t c_hsv = lv_color_to_hsv(color);
44 …al-colors) of colors. In this system all named colors have a nominal main color as well as four da…
68 To get the main color use `lv_color_t c = lv_palette_main(LV_PALETTE_...)`.
70 For the lighter variants of a palette color use `lv_color_t c = lv_palette_lighten(LV_PALETTE_..., …
71 For the darker variants of a palette color use `lv_color_t c = lv_palette_darken(LV_PALETTE_..., v)…
74 The following functions can modify a color:
76 // Lighten a color. 0: no change, 255: white
[all …]
Dimage.md17 - *cf* Color format. See [below](#color-format)
36 Various built-in color formats are supported:
37 - **LV_IMG_CF_TRUE_COLOR** Simply stores the RGB colors (in whatever color depth LVGL is configured…
39 …ED** Like `LV_IMG_CF_TRUE_COLOR` but if a pixel has the `LV_COLOR_TRANSP` color (set in *lv_conf.h…
41color of `style.img_recolor` and the set opacity. The source image has to be an alpha channel. Thi…
45 For 32-bit color depth:
51 For 16-bit color depth:
56 For 8-bit color depth:
61 …a *Raw* format to indicate that it's not encoded with one of the built-in color formats and an ext…
80 3. Select the [Color format](#color-formats).
[all …]
/lvgl-3.4.0/docs/widgets/extra/
Dcolorwheel.md8 …e implies *Color wheel* allows the user to select a color. The Hue, Saturation and Value of the co…
10 Long pressing the object, the color wheel will change to the next parameter of the color (hue, satu…
13 - `LV_PART_MAIN` Only `arc_width` is used to set the width of the color wheel
18 ### Create a color wheel
20 …ob_recolor)` creates a new color wheel. With `knob_recolor=true` the knob's background color will …
22 ### Set color
24 The color can be set manually with `lv_colorwheel_set_hue/saturation/value(colorwheel, x)` or all a…
28 The current color mode can be manually selected with `lv_colorwheel_set_mode(colorwheel, LV_COLORWH…
30 The color mode can be fixed (so as to not change with long press) using `lv_colorwheel_set_mode_fix…
33 - `LV_EVENT_VALUE_CHANGED` Sent if a new color is selected.
Dled.md17 You can set the color of the LED with `lv_led_set_color(led, lv_color_hex(0xff0080))`.
18 This will be used as background color, border color, and shadow color.
/lvgl-3.4.0/src/misc/
Dlv_color.h303 static inline uint8_t lv_color_to1(lv_color_t color) in lv_color_to1() argument
306 return color.full; in lv_color_to1()
308 …if((LV_COLOR_GET_R(color) & 0x4) || (LV_COLOR_GET_G(color) & 0x4) || (LV_COLOR_GET_B(color) & 0x2)… in lv_color_to1()
315 …if((LV_COLOR_GET_R(color) & 0x10) || (LV_COLOR_GET_G(color) & 0x20) || (LV_COLOR_GET_B(color) & 0x… in lv_color_to1()
322 …if((LV_COLOR_GET_R(color) & 0x80) || (LV_COLOR_GET_G(color) & 0x80) || (LV_COLOR_GET_B(color) & 0x… in lv_color_to1()
331 static inline uint8_t lv_color_to8(lv_color_t color) in lv_color_to8() argument
334 if(color.full == 0) in lv_color_to8()
339 return color.full; in lv_color_to8()
342 LV_COLOR_SET_R8(ret, LV_COLOR_GET_R(color) >> 2); /*5 - 3 = 2*/ in lv_color_to8()
343 LV_COLOR_SET_G8(ret, LV_COLOR_GET_G(color) >> 3); /*6 - 3 = 3*/ in lv_color_to8()
[all …]
Dlv_color.c36 LV_ATTRIBUTE_FAST_MEM void lv_color_fill(lv_color_t * buf, lv_color_t color, uint32_t px_num) in lv_color_fill() argument
41 *buf = color; in lv_color_fill()
46 uint32_t c32 = (uint32_t)color.full + ((uint32_t)color.full << 16); in lv_color_fill()
74 *buf = color; in lv_color_fill()
80 *buf = color; in lv_color_fill()
82 *buf = color; in lv_color_fill()
84 *buf = color; in lv_color_fill()
86 *buf = color; in lv_color_fill()
89 *buf = color; in lv_color_fill()
91 *buf = color; in lv_color_fill()
[all …]
Dlv_style_gen.h200 .prop = LV_STYLE_BG_COLOR, .value = { .color = val } \
205 .prop = LV_STYLE_BG_COLOR_FILTERED, .value = { .color = val } \
215 .prop = LV_STYLE_BG_GRAD_COLOR, .value = { .color = val } \
220 .prop = LV_STYLE_BG_GRAD_COLOR_FILTERED, .value = { .color = val } \
260 .prop = LV_STYLE_BG_IMG_RECOLOR, .value = { .color = val } \
265 .prop = LV_STYLE_BG_IMG_RECOLOR_FILTERED, .value = { .color = val } \
280 .prop = LV_STYLE_BORDER_COLOR, .value = { .color = val } \
285 .prop = LV_STYLE_BORDER_COLOR_FILTERED, .value = { .color = val } \
315 .prop = LV_STYLE_OUTLINE_COLOR, .value = { .color = val } \
320 .prop = LV_STYLE_OUTLINE_COLOR_FILTERED, .value = { .color = val } \
[all …]
Dlv_style_gen.c174 .color = value in lv_style_set_bg_color()
182 .color = value in lv_style_set_bg_color_filtered()
198 .color = value in lv_style_set_bg_grad_color()
206 .color = value in lv_style_set_bg_grad_color_filtered()
270 .color = value in lv_style_set_bg_img_recolor()
278 .color = value in lv_style_set_bg_img_recolor_filtered()
302 .color = value in lv_style_set_border_color()
310 .color = value in lv_style_set_border_color_filtered()
358 .color = value in lv_style_set_outline_color()
366 .color = value in lv_style_set_outline_color_filtered()
[all …]
/lvgl-3.4.0/src/draw/sw/
Dlv_draw_sw_blend.c27 … lv_color_t color, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stide);
29 …lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_str…
31 …ended(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride, lv_color_t color,
59 #define FILL_NORMAL_MASK_PX(color) \ argument
60 if(*mask == LV_OPA_COVER) *dest_buf = color; \
61 else *dest_buf = lv_color_mix(color, *dest_buf, *mask); \
66 #define FILL_NORMAL_MASK_PX(color) \ argument
67 if(*mask == LV_OPA_COVER) *dest_buf = color; \
68 …er->screen_transp) lv_color_mix_with_alpha(*dest_buf, dest_buf->ch.alpha, color, *mask, dest_buf, …
69 else *dest_buf = lv_color_mix(color, *dest_buf, *mask); \
[all …]
/lvgl-3.4.0/examples/widgets/img/
Dlv_example_img_2.c4 static lv_obj_t * create_slider(lv_color_t color);
46 …lv_color_t color = lv_color_make(lv_slider_get_value(red_slider), lv_slider_get_value(green_slide… in slider_event_cb() local
49 lv_obj_set_style_img_recolor(img1, color, 0); in slider_event_cb()
52 static lv_obj_t * create_slider(lv_color_t color) in create_slider() argument
57 lv_obj_set_style_bg_color(slider, color, LV_PART_KNOB); in create_slider()
58 lv_obj_set_style_bg_color(slider, lv_color_darken(color, LV_OPA_40), LV_PART_INDICATOR); in create_slider()
Dlv_example_img_2.py25 def create_slider(color): argument
29 slider.set_style_bg_color(color, lv.PART.KNOB)
30 slider.set_style_bg_color(color.color_darken(lv.OPA._40), lv.PART.INDICATOR)
36color = lv.color_make(red_slider.get_value(), green_slider.get_value(), blue_slider.get_value())
39 img1.set_style_img_recolor(color, 0)
/lvgl-3.4.0/src/draw/
Dlv_draw_label.c59 dsc->color = lv_color_black(); in lv_draw_label_dsc_init()
196 line_dsc.color = dsc->color; in lv_draw_label()
206 lv_color_t color = lv_color_black(); in lv_draw_label() local
275 recolor.full = dsc->color.full; in lv_draw_label()
283 color = dsc->color; in lv_draw_label()
285 if(cmd_state == CMD_STATE_IN) color = recolor; in lv_draw_label()
297 color = dsc->sel_color; in lv_draw_label()
301 dsc_mod.color = color; in lv_draw_label()
316 line_dsc.color = color; in lv_draw_label()
327 line_dsc.color = color; in lv_draw_label()
/lvgl-3.4.0/docs/_static/css/
Dcustom.css50 background-color: #f5f5f5;
53 color: #333;
102 background-color: #2980b9;
103 color: white;
107 color: white;
112 color: white;
/lvgl-3.4.0/src/extra/widgets/meter/
Dlv_meter.h76 lv_color_t color; member
81 lv_color_t color; member
146 lv_color_t color);
160 uint16_t len, lv_color_t color, int16_t label_gap);
188 lv_color_t color, int16_t r_mod);
212 …or_t * lv_meter_add_arc(lv_obj_t * obj, lv_meter_scale_t * scale, uint16_t width, lv_color_t color,
/lvgl-3.4.0/zephyr/
Dlvgl_display.h34 lv_color_t color, lv_opa_t opa);
37 lv_color_t color, lv_opa_t opa);
40 lv_color_t color, lv_opa_t opa);
43 lv_color_t color, lv_opa_t opa);
Dlvgl_display_24bit.c32 lv_color_t color, lv_opa_t opa) in lvgl_set_px_cb_24bit() argument
44 color = lv_color_mix(color, mix_color, opa); in lvgl_set_px_cb_24bit()
48 converted_color.full = lv_color_to32(color); in lvgl_set_px_cb_24bit()
Dlvgl_display_32bit.c33 lv_color_t color, lv_opa_t opa) in lvgl_set_px_cb_32bit() argument
39 *buf_xy = lv_color_to32(color); in lvgl_set_px_cb_32bit()
42 *buf_xy = lv_color_to32(lv_color_mix(color, bg_color, opa)); in lvgl_set_px_cb_32bit()
/lvgl-3.4.0/src/hal/
Dlv_hal_disp.c44 lv_color_t color, lv_opa_t opa);
47 lv_color_t color, lv_opa_t opa);
50 lv_color_t color, lv_opa_t opa);
53 lv_color_t color, lv_opa_t opa);
56 lv_color_t color, lv_opa_t opa);
58 static void set_px_alpha_generic(lv_img_dsc_t * d, lv_coord_t x, lv_coord_t y, lv_color_t color, lv…
611 lv_color_t color, lv_opa_t opa) in set_px_cb_alpha1() argument
621 set_px_alpha_generic(&d, x, y, color, opa); in set_px_cb_alpha1()
625 lv_color_t color, lv_opa_t opa) in set_px_cb_alpha2() argument
635 set_px_alpha_generic(&d, x, y, color, opa); in set_px_cb_alpha2()
[all …]
/lvgl-3.4.0/docs/widgets/core/
Dcanvas.md26 `LV_CANVAS_BUF_SIZE_...` macros help to determine the size of the buffer with different color forma…
28 The canvas supports all the built-in color formats like `LV_IMG_CF_TRUE_COLOR` or `LV_IMG_CF_INDEXE…
29 See the full list in the [Color formats](/overview/image.html#color-formats) section.
32 For `LV_IMG_CF_INDEXED_1/2/4/8` color formats a palette needs to be
36 To set a pixel's color on the canvas, use `lv_canvas_set_px_color(canvas, x, y, LV_COLOR_RED)`.
37 With `LV_IMG_CF_INDEXED_...` the index of the color needs to be passed as color.
43 … 50% opacity. Note that if the current color format doesn't support colors (e.g. `LV_IMG_CF_ALPHA_…
47 The color format of the buffer and the canvas need to match.
59 The draw function can draw to any color format. For example, it's possible to draw a text to an `LV…
/lvgl-3.4.0/src/draw/sdl/
Dlv_draw_sdl_polygon.c89 SDL_Color color; in lv_draw_sdl_polygon() local
90 lv_color_to_sdl_color(&draw_dsc->bg_color, &color); in lv_draw_sdl_polygon()
91 SDL_SetTextureColorMod(texture, color.r, color.g, color.b); in lv_draw_sdl_polygon()
Dlv_draw_sdl_label.c62 lv_color_t color = dsc->color; in lv_draw_sdl_draw_letter() local
137 SDL_SetTextureColorMod(texture, color.ch.red, color.ch.green, color.ch.blue); in lv_draw_sdl_draw_letter()
Dlv_draw_sdl_line.c86 SDL_Color color; in lv_draw_sdl_draw_line() local
87 lv_color_to_sdl_color(&dsc->color, &color); in lv_draw_sdl_draw_line()
89 SDL_SetTextureColorMod(texture, color.r, color.g, color.b); in lv_draw_sdl_draw_line()
/lvgl-3.4.0/src/core/
Dlv_obj_style_gen.c174 .color = value in lv_obj_set_style_bg_color()
182 .color = value in lv_obj_set_style_bg_color_filtered()
198 .color = value in lv_obj_set_style_bg_grad_color()
206 .color = value in lv_obj_set_style_bg_grad_color_filtered()
270 .color = value in lv_obj_set_style_bg_img_recolor()
278 .color = value in lv_obj_set_style_bg_img_recolor_filtered()
302 .color = value in lv_obj_set_style_border_color()
310 .color = value in lv_obj_set_style_border_color_filtered()
358 .color = value in lv_obj_set_style_outline_color()
366 .color = value in lv_obj_set_style_outline_color_filtered()
[all …]
/lvgl-3.4.0/examples/widgets/canvas/
Dlv_example_canvas_1.c15 rect_dsc.bg_grad.stops[0].color = lv_palette_main(LV_PALETTE_RED); in lv_example_canvas_1()
16 rect_dsc.bg_grad.stops[1].color = lv_palette_main(LV_PALETTE_BLUE); in lv_example_canvas_1()
26 label_dsc.color = lv_palette_main(LV_PALETTE_ORANGE); in lv_example_canvas_1()

12345