lv_color_op.h
Typedefs
-
typedef lv_color_t (*lv_color_filter_cb_t)(const struct lv_color_filter_dsc_t*, lv_color_t, lv_opa_t)
Functions
-
lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix)
Mix two colors with a given ratio.
- 参数:
c1 -- the first color to mix (usually the foreground)
c2 -- the second color to mix (usually the background)
mix -- The ratio of the colors. 0: full
c2
, 255: fullc1
, 127: halfc1
and halfc2
- 返回:
the mixed color
-
lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg)
备注
Use bg.alpha in the return value
备注
Use fg.alpha as mix ratio
- 参数:
fg --
bg --
- 返回:
-
uint8_t lv_color_brightness(lv_color_t c)
Get the brightness of a color
- 参数:
c -- a color
- 返回:
brightness in range [0..255]
-
void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb)
-
struct lv_color_filter_dsc_t