- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:36 AM
Hi,
Can someone brief me how to change the background color of "global text search" box?
Regards,
Rajeev
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 11:41 AM
Hi,
This can be done simply by Writing a UI Script as mentioned below:
Script:
top.$j('#sysparm_search').css('background','green');
Make Sure the Global Checkbox is marked True in the UI Script Form page as shown in the Screen shot.
Result:
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2017 04:26 PM
Hey Rajeev,
I don't know if you already know but there is a system configuration page where you can adjust the different colors of various elements on the main ServiceNow harness. Do this by typing 'Basic Configuration' in the navbar. If you're using the new UI 16, click the 'Basic Configuration UI16' module. Unfortunately the global text search box is not one of the options. Here's the official doc:
Configure logo, colors, and system defaults for UI16
If you look closely at the global text search input element you'll notice that the background css is transparent. So the background color is actually just whatever the top 'Header Background Color' is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 09:17 AM
The background colour is the same as the banner colour, I thought - but it's possible to change the colour of the text within it using $search-text-color in the themes.
jim.coyne covers this in his excellent blog post: Istanbul Theme Properties Visual Guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 11:41 AM
Hi,
This can be done simply by Writing a UI Script as mentioned below:
Script:
top.$j('#sysparm_search').css('background','green');
Make Sure the Global Checkbox is marked True in the UI Script Form page as shown in the Screen shot.
Result:
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2017 02:34 PM
Just a word of caution before using this approach. This was done in our environment, and we experienced unintended consequences on a date field on project tasks when viewed from the planning console (an error displayed below the field every time the form was opened). Disabling this global script took care of the error. Seems totally random, hence my word of caution. Without regression testing basically everything in your system, it's near impossible to know the effects of a global UI script that seems relatively innocuous.
I'd be glad for different points of view, but that's the way I'm seeing it at this point.