Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 6th edition is out.

How to send favorite colors/color template in AJO?


Level 2



Is there a way to set favorite colors or a color template in AJO?



1 Reply


Employee Advisor

Depends on how you want to use the colors etc. What I have found works really well is to have a list of HTML Hex Colors saved in an expression code fragment. You can then give the colors a variable name so that when you are building your HTML email templates you can replace the color value with the value from the fragment. i.e. 



{% let BrandPrimary = FF0000 %}
{% let BrandSecondary = 002395 %}



Then in your HTML can you do include the fragment in your template and call in the different colors by names.


    .div-1 {
        background-color: #{{BrandPrimary}};
    .div-2 {
    	background-color: #{{BrandSecondary}}; }

    <div class="div-1">Something </div>
    <div class="div-2"> something else </div>





Then if you need to update the color definitions or add/change them you can do it in one place, within the fragment and have it apply everywhere the fragment is used.