- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 02:37 AM
Hi
I am trying to change the colour for new Change Models I have added, but the colour will not update it just remains pink. I tried copying in a code from an internet list which didn't work so I just copied the code over from the "Normal" change model so it is identical but the colour still doesn't change. It looks green in the model config view but not when selecting the change.
Normal Change Model colour code.
Normal 2.0 Change Model colour code
Then the view from the change selection area.
I've tried mixing things up and gave Normal the green colour code that is used by "Standard" and when I did that it changed to green but then the "Standard" model changed to blue. I cant work out why it is behaving this way. Am I limited to a set number of colours?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 02:59 AM
Hi @StevenITSM ,
ServiceNow has only 8–10 color slots are available for change model badges. The assignment happens by order, not by hex code.
You can write a custom UI Script or Client Script to override the colors using CSS. use data-model-name or class name to assign your own styles.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2026 06:19 AM
in australia, this doesnt seem to work at all for me. model color is saved, but doesnt affect the tile. i also noted that, doing a copy of an existing model (insert & stay) caused the new copy to have the original color from the model it was copied from, and the original model adopted yet a different color (blue in my case though i had configured pink for both the orig and new copy). This seems to align more with what @pavani_paluri said, however still begs the question of why there is a color field (which apparently has worked before as in your case) and is there a way to use it effectively?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2026 06:22 AM
Hi,
I confirm. In Zurich, it was working very well.
Now in Australia, the selected color is not applied in the "Create a change request" page.
Did you already open a case for that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
I found a solution for this! There may be another way to solve this so let me explain what I've found below.
The problem
After upgrading to the Australia version, the landing page to create new changes was updated from 'sn_chg_model_ui_landing' to 'create-change'. The new page no longer reads the values you have selected in the 'color' field on a change model. This was acknowledged by ServiceNow when I raised a case with them.
The solutions
There are a few options here, I'll explain 2 of them.
The first option is to go back to using the previous landing page, which does use the 'color' field on the change models. You can go back to this page by setting the 'com.snc.change_request.next_create_page' system property to false, however, this will not affect workspaces. Workspaces such as the Service Operations Workspace will continue to use the new create-change landing page if you implement this solution.
The other option required me to look into the new landing page to understand how it was assigning the colours to the different models. ServiceNow is not assigning the colours based on order, as is implied by their official statement, but is instead configuring certain models to use specific colours and stating that any model created by customers will be the same colour. I have included a 'tldr' at the bottom explaining how to implement this solution if you are not interested in seeing how I found this 🙂
By looking at the 'Create change' macroponent used to populate the sn_chg_model_ui_landing page, I found that the different colour options were defined within the 'Card Base Container' macroponent as a 'sidebar' property and I have included the colour options below for your convenience. Each model needs to select one 'color' and one 'variant' from the following list, the variants essentially control the tint/tone of the 'color' selected:
| Colors | Variants |
ai critial high warning moderate positive info low magenta pink orange yellow brown green green-yellow blow gray teal purple | primary secondary tertiary |
From here I had to find where these colours were being set for each model. I found that the change cards were being loaded by the 'Transform initial data' UX client script and within the UI builder I could see that this script was being called by the 'Create Change Landing - Get cards' data resource. That data resource was calling the 'changeCards' resource from the 'sn_chg_create_landing' scripted REST service. The changeCards resource is calling the 'CreateChangeLanding' script include which extends the 'CreateChangeLandingSNC' script include. Within the CreateChangeLandingSNC script include, you can see the following lines which are defining which color and variant each change model should be using based on their names. In this code you can see that any custom models you have created will be allocated the color 'info' and the variant 'secondary' which in the Polaris/Coral themes will be a blue colour.
_formatModelCard: function(cardData) {
var card = this._formatDefaultCard(cardData);
if (cardData.default_change_model.value + '' === 'true') {
card.sidebar = {
color: 'positive',
variant: 'secondary'
};
card.color = 'positive';
} else if (card.sys_name === 'Emergency') {
card.sidebar = {
color: 'critical',
variant: 'secondary'
};
card.color = 'critical';
} else if (cardData.sys_created_by.display_value === 'admin' || cardData.sys_created_by.display_value === 'Change.Manager') {
card.sidebar = {
color: 'info',
variant: 'secondary'
};
card.color = 'info';
} else {
card.sidebar = {
color: 'pink',
variant: 'secondary'
};
card.color = 'pink';
}
We can edit the CreateChangeLanding script include to overwrite these values and set our own values. I have included an example at the bottom using some test data. If you want to understand what the colours will look like before setting them within this script include, you will need to navigate to your theme and check the colours you have set there. As an example, the color 'positive' paired with the variant 'secondary' will use the colour defined in your theme as '--now-card_sidebar--secondary_positive--background-color'. Searching for this within your theme definitions will lead you to find the RGB value of that colour combination. Otherwise, trial and error always works. You can also use devTools to inspect the style of the coloured sidebars when viewing the sn_chg_model_ui_landing page to see which colour in the theme is being used for that colour.
TLDR solution implementation
To manually assign which colour each model should use, open the 'CreateChangeLanding' script include within your instance. You will be overwriting the values defined in the 'CreateChangeLandingSNC' script include. For each model, create an 'if' and subsequent 'else if' statement and define a colour and a variant from the table below to assign a specific colour for that model. The 'color' will define the colour of the model, the 'variant' will define the tint/tone of the colour. Example code is included at the bottom.
Colour and variant options:
| Colors | Variants |
ai critial high warning moderate positive info low magenta pink orange yellow brown green green-yellow blow gray teal purple | primary secondary tertiary |
Example code for the 'CreateChangeLanding' script include to overwrite the colours of custom models 'Trial' and 'Test':
var CreateChangeLanding = Class.create();
CreateChangeLanding.prototype = Object.extendsObject(CreateChangeLandingSNC, {
_formatModelCard: function(cardData) {
var card = this._formatDefaultCard(cardData);
if (card.sys_name === 'Trial') {
card.sidebar = {
color: 'critical',
variant: 'primary'
};
} else if(card.sys_name === 'Test'){
card.sidebar = {
color: 'info',
variant: 'primary'
};
}
return card;
},
type: 'CreateChangeLanding'
});