I need to setup in Marketing Cloud Email Studio the Global Template background and content background colors dynamically. I have been trying to find a function to do that using AMPScript but didn't find it.
Is that possible?
In below code, replace "Name of your DE holding colours" with the actual name of your Data Extension. Make sure the name under which you save your email, matches exactly the email name in your DE.
%%[ @lookupValue = emailname_ set @bgcolor = Lookup("Name of your DE holding colors","Background Color","Email Name", @lookupValue) ]%% <html> <body style="background-color: %%=v(@bgcolor)=%%"> <h1>Hello world!</h1> </body> </html>