Dynamic background colour for a product based on metafield

Hi there! Is there a similar way to do this in the Highlight theme? Tried to input this in this code in the main-product.liquid but am not having any success.