Get style property in a given state?

Hello,

I’m trying to get the default bg-color of a pressed button.

The example on line 35 in lvgl/src/lv_core/lv_obj_style_dec.h suggests that I could use lv_obj_get_style_local_bg_color() for this. But the compiler complains that no such function exists.

What am I missing here?