Color variable support for icons
Summarize
Summary of Color variable support for icons
This feature enables ServiceNow customers to customize the appearance of mobile map screen icons by applying color variables. Using theFontColorVariablestyle option, you can assign colors defined in the UX Theme Properties (sysuxthemeproperty) table to mobile icons, enhancing theming consistency and visual communication within your mobile applications.
Show less
Using Color Variables for Mobile Icons
In mobile icon configuration, the Set appearance section allows you to specify a color variable instead of a fixed color. This approach leverages predefined color variables from ServiceNow’s UX Theme Properties, ensuring alignment with your overall design system and accessibility standards.
To select appropriate colors, refer to the color design guide, which categorizes variables into two main palettes:
- Alert color palette: Used for highlighting important statuses, states, and tasks with specific meanings rather than decoration.
- Grouped color palette: Follows industry color conventions to denote association with specific industries or business lines. Consistency in usage across your app is recommended.
Alert Color Palette
The alert palette includes colors such as Critical, High, Warning, Moderate, Info, Positive, and Low. Each color offers three options:
- Two standard mobile variables
- One accessible option designed to improve navigability for icons without text
These variables are named consistently, for example, alert--critical-2, alert--critical-3, and the accessible option alert--critical-4 for mobile. Corresponding web variables follow a similar naming convention with the prefix --now-coloralert--.
Grouped Color Palette
This palette provides a range of colors including Blue, Brown, Gray, Green, Green-Yellow, Magenta, Orange, Pink, Purple, Teal, and Yellow. Similar to the alert palette, each grouped color offers three variable options (two standard and one accessible) to ensure consistent use and accessibility in your mobile icons.
Variable names follow the pattern --now-colorgrouped--colorname-level for web and grouped--colorname-level for mobile.
Practical Benefits for ServiceNow Customers
- Consistent Theming: Apply standardized color variables to icons, maintaining visual consistency across mobile applications.
- Improved Accessibility: Use accessible color options to enhance usability for all users, particularly for icons lacking text.
- Clear Status Communication: Utilize alert colors to effectively convey important statuses and task priorities.
- Industry Alignment: Use grouped palette colors to reflect industry-specific color conventions, reinforcing business context.
Next Steps
To implement these color variables:
- Access the mobile icon’s Set appearance section and select the FontColorVariable style option.
- Choose the desired color variable from the UX Theme Properties table based on your use case and accessibility requirements.
- Refer to the color design guide to select the appropriate alert or grouped palette variable.
- Test icon appearance in your mobile map screens to ensure clarity and consistency.
Learn how to use color variables to change theming in your mobile map screens
Mobile icons have a Set appearance section used to define the appearance of your icons. Use the FontColorVariable style option to use a color variable a color. Using this style you can define any color variable from the UX Theme Properties [sys_ux_theme_property] table. For a list available variables see the color design guide below. For details on creating map screens, see Configure an icon UI section. For details on creating icons in mobile, see Mobile icons. |
Mobile icon color guide
Color variables are divided into Use the design guideline to identify the right color variable for your use case.
- Alert color palette
- Alert color palette colors highlight important statuses, states and tasks. Use alert colors to communicate a specific meaning rather than for decoration or organization.
- Grouped color palette
- Grouped color palette colors follow color conventions in a line of industry. Use these colors to show that the colored item is associated with a specific industry or line of business. The meaning of each color depends on context, but should remain consistent within your app.
Each support color has three options, including an assessable option. Consider using the accessible color option for icons that do not contain text to improve navigability for your users.
| Color name | Example | Color variables |
|---|---|---|
| Critical |
|
|
| High |
|
|
| Warning |
|
|
| Moderate |
|
|
| Info |
|
|
| Positive |
|
|
| Low |
|
| Color name | Example | Color options |
|---|---|---|
| Blue |
|
|
| Brown |
|
|
| Gray |
|
|
| Green |
|
|
| Green-Yellow |
|
|
| Magenta |
|
|
| Orange |
|
|
| Pink |
|
|
| Purple |
|
|
| Teal |
|
|
| Yellow |
|