Using code to let users change colours on the template
- Create a colour swatch in InDesign or in Chili - call it something obvious.
- In this example we have two colours that we would like to change simultaneously. The text colour and the block colour.
- Apply these to all the elements that you would like to change automatically in the template.
- Create a list variable for the user to choose the colours you have predefined.
- Under Type Specific create the list of colours you'd like the end user to be able to choose.
- Under Actions click the 'Edit' button for On Change.
- Here create the code to force the colours to change when the end user chooses from the list.
If the variable 'Colour' select item name is string 'Red'
> set the colour 'TextColour' apply from colour = colour 'Red' id
> set the colour 'BlockColour' apply from colour = colour 'Orange' id - In the Variables tab the end user will now see a list of colours to choose from.
- When they choose a colour theme the block colour and the text colour change simultaneously.