How to read an object's keyvalue in a macro

Hi, I want to make a macro that changes the display color of an object according to the RGB value stored in a key value of that object.

Something like this

_properties
o
c
o
(read the value from the key “phase_colour”)
_EnterEnd

How would I approach this?

I want to make a macro that will change every object its own phase_colour value, func_colour value and so on.

bumping this, can anyone help here :persevere: