How do i switch between this two label

hellow friends, i’m using recycleview extension, i want to switch between favorite and unfavorite label, i tried this way but it doesn’t work

i want when user cick the favorite button color change to red, when click same button again color change to black as it was, how do i achieve that?

You need to use when any button click event, if that heart is a button and then set red heart on click event by using set properties block.

On label click, first get the color of the clicked label,then use if then else

If the colour is red
Then mark it as unfav
Else mark it as favo