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?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
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>