Hello,
Is there a way to set favorite colors or a color template in AJO?
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
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.
<style>
.div-1 {
background-color: #{{BrandPrimary}};
}
.div-2 {
background-color: #{{BrandSecondary}}; }
</style>
<body>
<div class="div-1">Something </div>
<div class="div-2"> something else </div>
</body>
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.
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.
<style>
.div-1 {
background-color: #{{BrandPrimary}};
}
.div-2 {
background-color: #{{BrandSecondary}}; }
</style>
<body>
<div class="div-1">Something </div>
<div class="div-2"> something else </div>
</body>
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.
Views
Likes
Replies