Payload inside style element

I am trying to have a color picker that sends a payload with color data, where the background of the whole dashboard should be changed on sent. The easiest way to do so what I've found, is to use a Template node that takes the payload and insert it into the style. However, I can't get that to work. I do not know if there is a better way for this or what could be wrong in the syntax?

Example: {
background: {{msg.payload}};

if this is standard template node try {{payload}}, no need for msg.