First time posting here and I'm a bit new to coding so I hope this isn't too silly of a question.
I'm trying to setup a callback function to change the color of my product price depending on if it's on special or not. I originally setup a if statement that checked if compare_at_price > price and that worked but wouldn't update when variant wad changed. I then found this page which is about defining a callback. Below I'll put the attempts I tried to get it to work - I tried to use both of these in product-template.liquid.