This article explains what the color theme setting is and provide examples of how it can be used with the binding syntax in smart templates.
Prerequisites
|
What is the color theme setting?
The color theme allows controlling the colors available in Office in Design > Colors. The color theme setting can be set dynamically using the binding syntax.
Important
|
How to set the color theme setting in a smart template
When building the template settings and properties, the Color Theme can be used to set the colors for the smart template, following the steps below:
- In Template Designer, open the Advanced tab.
- Click + Add property.
- In the Type field select Color Theme.
- In the Color Theme field enter the required binding.
- Optional: set the additional setting Disable Updates. If this is enabled, no changes will be applied when the document content updater is used. By default it's disabled, allowing updates.
- Click Add to document:
- The field is added to the list with Document settings:
Color Theme examples
In the examples below this ColorThemes data source is used:
Example 1
Using Color Theme to apply the color theme based on the value of the 'Brand theme' dropdown question originating from the response form.
Binding | Input | Output |
---|---|---|
{{Form.Brand_theme.ColorTheme}} | Brand theme = "Blue" | The blue theme is applied to the document |
Brand theme = "Green" | The green theme is applied to the document |
Example 2
Using Color Theme to apply the color theme based on the 'Office' dropdown question originating from the User Profile. In the User Profile the 'Office' question is linked to the Offices data source. This data source contains a BrandTheme column that has a reference to the ColorThemes data source:
Binding | Input | Output |
---|---|---|
{{UserProfile.Office.BrandTheme.ColorTheme}} | Office = "Office New York" | The blue theme is applied to the document |
Office = "Office Eindhoven" | The green theme is applied to the document |
Example 3
Using Color Theme together with the DataSources[] function to always apply the same color theme.
Binding | Output |
---|---|
{{DataSources.ColorThemes["Blue"].ColorTheme}} | The blue theme is applied to the document |
Best practice using colors in email elements
When you use Color Theme in email elements, this color theme is not applied in Outlook.
Outlook uses it's own color theme.
In Word, the color theme of an email element looks like this:
In Outlook, the color theme of the same email element looks like this:
To be sure that the right color in Outlook is used, use custom colors for the email element, instead of the color theme. To select a custom color, follow the steps below:
- Select the text and go to Font Color > More Colors... from the ribbon in Word.
- Select the right color and click OK:
- Repeat these steps for all colors you want to use.
Important
Using custom colors not only applies to text, but to everything with a color setting, like shapes and tables.
- When you use custom colors in the email element, the colors in Outlook are now equal to the colors in Word. The result looks like this:
Comments
Article is closed for comments.