- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2015 01:28 AM
The picture attached is the variables created in a catalog item.
I want to change the color from blue to some other color.
How to change it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2015 02:20 AM
Hi sneha,
make one on load script and paste below code.
var text = $j("label[for='IO:8bbf1720eb0311003623666cd206fe8f']");
text.css('background-color','orange');
text.css('width','100%');
change the for="IO:yourlabelID".
Please mark helpful/correct/like if it helps
Regards,
Rushit Patel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2015 01:49 AM
I think the servicenow theme decides what color the labels will be of. You can change the theme to change the color.
However, if you want change it for a particular catalog item then DOM manipulation will be required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2015 02:03 AM
Hi,
For changing form label color, you need to write onLoad client script. Please refer below script for your reference:
function onLoad() {
//Change the description label to 'My New Label' with bold red text
changeFieldLabel('description', 'My New Label', 'red', 'bold','yellow');
}
function changeFieldLabel(field, label, color, weight,bgColor){
try{
var labelElement = $('label.' + g_form.getControl(field).id);
labelElement.select('label').each(function(elmt) {
elmt.innerHTML = label + ':';
});
if(color)
{
//Label Color
labelElement.style.color = color;
//Label Background color
labelElement.style.background = bgColor;
}
if(weight)
labelElement.style.fontWeight = weight;
}catch(e){}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2015 02:18 AM
If you want to change all labels on a item then just write an onload catalog client sript with below line of code,
$("label").style.background = 'red';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2015 02:20 AM
Hi sneha,
make one on load script and paste below code.
var text = $j("label[for='IO:8bbf1720eb0311003623666cd206fe8f']");
text.css('background-color','orange');
text.css('width','100%');
change the for="IO:yourlabelID".
Please mark helpful/correct/like if it helps
Regards,
Rushit Patel