Issue with dynamic data and Meta box

Hi guys

I need small help here. I tried everything and nothing works. I even tried with attributes but looks like in my case it is not working either. I have Meta box with field and i want to apply background color for category button

Can someone assist please?