Color variable support for icons
Summarize
Summary of Color variable support for icons
Starting with the Yokohama release, ServiceNow enables the use of color variables to theme mobile map screen icons more effectively. This feature allows you to leverage predefined color variables from the UX Theme Properties table to control icon colors dynamically through theFontColorVariablestyle option. This approach supports consistent and accessible theming aligned with your design guidelines.
Show less
Using Color Variables for Mobile Icons
Mobile icons include a Set appearance section where you can specify the FontColorVariable style. By assigning a color variable here, you select from colors defined in the UX Theme Properties [sysuxthemeproperty] table, ensuring consistency across your app’s UI. This method simplifies managing icon colors and helps maintain compliance with accessibility standards.
Color Palettes and Their Purpose
Two main color palettes are provided to guide your color selections:
- Alert Color Palette: Designed to highlight important statuses, states, and tasks. Use these colors to convey specific meanings (e.g., critical, warning, info) rather than for decorative purposes.
- Grouped Color Palette: Reflects industry or line-of-business conventions. These colors help users associate elements with a particular context while maintaining consistency within the app.
Both palettes offer multiple variations including accessible options that improve usability, especially when icons lack text. Using accessible color options is recommended to enhance navigability for all users.
Color Variable Naming and Options
Each color in the palettes is available as multiple variable options for flexibility:
- Mobile Variables: e.g.,
alert--critical-2,alert--critical-3, and an accessible optionalert--critical-4. - Web Variables: Prefixed with
--now-color, such as--now-coloralert--critical-2,--now-coloralert--critical-3, and accessible--now-coloralert--critical-4.
This naming convention applies consistently across all alert and grouped colors (e.g., high, warning, info, blue, green, purple). Selecting the right variable ensures your icons integrate seamlessly with your theme and maintain visual clarity and compliance.
Practical Benefits for ServiceNow Customers
- Consistent Theming: Easily align icon colors with your organization’s branding and UX theme.
- Improved Accessibility: Use accessible color variants to enhance user experience, especially for visually impaired users.
- Simplified Configuration: Use predefined variables rather than defining custom colors, reducing development effort and errors.
- Clear Visual Communication: Apply alert colors to signify status and importance, and grouped colors to indicate business context effectively.
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 |
|