skip to content
26/12/2017

Model color palette

It is possible to define a list of colors in the template, this list can be used in the renderers and/or in the text editor.

Definition of the palette in the 'config.properties' file

charter.colors=#AAFF00,#FFAA00,#FF00AA,#AA00FF,#00AAFF

Example of the use of the palette

<c:set var="style" value="" />
<c:if test="${info.template.colorPalette}">
     <c:set var="color" value="${info.template.colorsMap[status.index]}" />
     <c:set var="style" value='style="background-color: ${color.htmlCode}; color: ${color.text};"' />
</c:if>

Palette with transparency

charter.colors=#AAFF00a22,#FFAA00a22