Can we add a custom color (Black) to Highlighted Value Conditions in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
Hi Team,
I'm working with Highlighted Value Conditions (sys_highlighted_value_condition) and noticed that the Color field supports the following OOTB values:
- critical
- warning
- info
- positive
- green
- yellow
- blue
- purple
- magenta
- pink
- brown
- gray
- teal
- orange
I added a new choice value "black" to the Color field, and it appears in the dropdown, but it does not render in the UI.
While investigating, I found that the rendering is handled by the now-highlighted-value component, which belongs to a private application (servicenow/now-highlighted-value).
My questions are:
- Is there a supported way to add a custom color such as black to Highlighted Value Conditions?
- Where are the supported color variants for now-highlighted-value defined?
- Has anyone successfully extended the component to support additional colors?
- Is a custom component/theme override the only option?
Any guidance or documentation would be greatly appreciated.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
Hi Sonalik,
Short answer to Q1 and Q4: there is no supported way to add a new variant such as "black" to Highlighted Value Conditions, and your analysis of why is exactly right. Working through your questions:
1. Supported way to add a custom color? No. The Color field on sys_highlighted_value_condition is only a selector — the list of values the platform offers. Rendering is done by the now-highlighted-value component, which only knows the fixed set of variants it was built with (the OOTB list you quoted: critical, warning, info, positive, green, yellow, blue, purple, magenta, pink, brown, gray, teal, orange). When the condition passes a value outside that set ("black"), the component has no style defined for it, so it falls back to rendering without a highlight — which is the behaviour you are seeing. Adding the sys_choice changes the dropdown only, never the rendering.
2. Where are the variants defined? Inside the now-highlighted-value component itself (its variant-to-color mapping uses the Now Design System color tokens), in the private @Servicenow/now-highlighted-value application, as you found. There is no customer-editable table, CSS record or property in the instance that defines or extends that variant list — that is also why it survives as a closed set: the sys_choice values and the component variants are two lists that ServiceNow keeps in sync out of the box, and only the first of them is editable, with no effect on its own.
3. Extending the component? Not in a supportable way. The app is private, so you cannot modify or subclass the component; cloning/replacing the OOB highlighted-value rendering in workspace lists would mean replacing delivered components, which is upgrade-sensitive and not something I'd recommend for a cosmetic color.
4. What you can do instead:
- Use the closest OOTB variant — "gray" is the neutral one normally used when a dark/subdued highlight is what you are after.
- If the requirement is really about the shade rather than a new variant name, Next Experience theming can change what an existing variant looks like instance-wide (themes redefine the Now design tokens the variants map to — e.g. you can darken the gray variant). Be aware that changes that variant everywhere it is used, it doesn't create a separate "black" option.
- For classic lists/forms only, field styles (sys_ui_style) with CSS such as background-color still work and do allow true black — but they do not drive the workspace now-highlighted-value rendering, so this only helps outside configurable workspaces.
So: keep the extra "black" choice out (it will just confuse admins, since it silently renders nothing), and pick between the gray variant or a theme-level change depending on whether "black" needs to be selectable per condition or is an instance-wide look.
Hope that confirms the direction of your investigation.
