Articles in this section

How to apply color themes to a template

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

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in installed.
  • Admin/owner access to the Templafy tenant and Space owner access.

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

  • The color theme setting only supported with templates that are stored in the Libraries (Documents, Presentations, and Spreadsheets Libraries).
  • Assets (Text elements, Email elements, Slides, and Slide elements Libraries) inherit properties from the document, presentation or spreadsheet upon insertion.
  • The color theme setting relies on the ColorThemes system data source.

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:

  1. In Template Designer, open the Advanced tab.
  2. Click + Add property.
  3. In the Type field select Color Theme.
  4. In the Color Theme field enter the required binding.
  5. 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.
  6. Click Add to document:
    advancedtabcolortheme.png
  7. The field is added to the list with Document settings:
    documentsettingscolortheme.png

Color Theme examples

In the examples below this ColorThemes data source is used:

datasourcecolorthemes.png

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:

datasourceoffices.png

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:

ColorThemeEmailWord.png

In Outlook, the color theme of the same email element looks like this:

ColorThemeEmail_Outlook.png

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:

  1. Select the text and go to Font Color > More Colors... from the ribbon in Word.
  2. Select the right color and click OK:
    ColorThemeEmail_CustomColor.png
  3. 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.

  4. 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:
    ColorThemeEmail_OutlookCustomColors.png
language delete links hyperlink lessthan tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.