- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 04:25 AM
Hi Everyone,
I am displaying an informational message from Server Script. How can I make this in green instead of blue?
Regards,
Diane
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 05:47 AM
Thank you all! The one provided by Deepankar is the same as Mohith and this only change the font color but not the background color. I ended up adding a Page Specific CSS by going to the Page Designer. Closing this thread!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 04:41 AM
Is this for UI16?
If so, the CSS variables you can use in your UI Theme (System UI > Themes) record are as follows:
$color-info-light: #D0D0CE
$color-info-dark: #333F48
Note I have only tested for the client side. Results may vary.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 05:25 AM
Hi Paul,
This is for Service Portal. I want to change it on a specific page only and not system wide.
Regards,
Diane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 04:47 AM
Hello
You can follow bellow approach
var text = '<div style="background-color:green;color:white">Color Changed<br/>';
g_form.addInfoMessage(text);
Please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 05:03 AM
Hi Mohith,
How about the background color? Thank you!
Regards,
Diane