# Setting tool tip background color/ text color

**URL:** <https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498>\
**Category:** Ignition\
**Created:** [December 30, 2014, 6:27pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498 "2014-12-30T18:27:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [December 30, 2014, 6:27pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/1 "2014-12-30T18:27:55Z")

</div>

Is there a command to set the tool tip background color/text color? I have tried looking in the components dir but can not seem to find any functions to set the color of the tool tip.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 30, 2014, 6:31pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/2 "2014-12-30T18:31:28Z")

</div>

perhaps try with html code inside the text property ?

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 30, 2014, 6:38pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/3 "2014-12-30T18:38:56Z")

</div>

You could put the following code in a mouseEntered event script, and then put similar code in the mouseExited event script to change the background back.

```auto
from javax.swing import UIManager
from java.awt import Color
UIManager.put("ToolTip.background", Color.RED)
UIManager.put("ToolTip.foreground", Color.BLUE)
```

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [December 30, 2014, 7:11pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/4 "2014-12-30T19:11:21Z")

</div>

Thank you that worked out great.

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [December 30, 2014, 7:12pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/5 "2014-12-30T19:12:39Z")

</div>

Do you happen to know what the default is so I can put it back to the default in the mouse exited event?

Thanks

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 30, 2014, 7:58pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/6 "2014-12-30T19:58:30Z")

</div>

No, but if you restart your Designer you can find out with this:

```auto
print UIManager.get("ToolTip.background")
print UIManager.get("ToolTip.foreground")
```

---

<div class="post-metadata">

**Author:** ![Blefe001](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@Blefe001](https://forum.inductiveautomation.com/u/Blefe001)\
**Post date:** [December 30, 2014, 8:32pm UTC](https://forum.inductiveautomation.com/t/setting-tool-tip-background-color-text-color/9498/7 "2014-12-30T20:32:09Z")

</div>

Great it looks to be

UIManager.put(“ToolTip.background”, Color(255,200,0,150))  
UIManager.put(“ToolTip.foreground”, Color.BLACK)

for the default.

Thanks
