How to extract RGB values from colorpicker widget?

I have R,B,G bytes. How to read the RGB values from colorpicker widget?

What version of LVGL are you using?

Assuming it’s 8x then in the callback you would use something like:

https://docs.lvgl.io/master/widgets/colorwheel.html#_CPPv421lv_colorwheel_get_rgbP8lv_obj_t

lv_color_t col = lv_colorwheel_get_rgb(obj);

then (based on Colors — LVGL documentation):

uintX_t red = col.red
uintX_t green = col.green
uintX_t blue = col.blue

note X is 8 or 16.

Please note that I havent tested this, I’m just going off the documentation.

In future please include more info in your query. A single line question isnt that helpful.

Regards

Thanks! It works with:
uintX_t red = col.ch.red
uintX_t green = col.ch.green
uintX_t blue = col.ch.blue