# Changing Tag Tree Browser Background & Font Colour

**URL:** <https://forum.inductiveautomation.com/t/changing-tag-tree-browser-background-font-colour/10968>\
**Category:** Ignition\
**Created:** [December 30, 2015, 2:59am UTC](https://forum.inductiveautomation.com/t/changing-tag-tree-browser-background-font-colour/10968 "2015-12-30T02:59:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasonbpong](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Jasonbpong](https://forum.inductiveautomation.com/u/Jasonbpong)\
**Post date:** [December 30, 2015, 2:59am UTC](https://forum.inductiveautomation.com/t/changing-tag-tree-browser-background-font-colour/10968/1 "2015-12-30T02:59:34Z")

</div>

Could anyone assist if I could change the Tag Tree Browser Background and Font Colour. The current one is white background and font is black. I couldn’t find anything on the properties that I can change.

I need to change the Background to Black and Font to White. Appreciate if anyone could assist.

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [January 3, 2016, 2:54pm UTC](https://forum.inductiveautomation.com/t/changing-tag-tree-browser-background-font-colour/10968/2 "2016-01-03T14:54:28Z")

</div>

Jasonbpong

welcome to the forums

the code below will do what you need, do take time to look to see how it works.

place it in the Script Editor/internalFrame/internalFrameOpened for the window the tag tree is in, you may have to modify the path to the component to make it work for you.

[code]from java.awt import Color  
from javax.swing.tree import DefaultTreeCellRenderer

cellRenderer = DefaultTreeCellRenderer()  
White = Color(255,255,255,255)  
black = Color(0,0,0,255)  
btr = system.gui.getParentWindow(event).getComponentForPath(‘Root Container.Tag Browse Tree’)

cellRenderer.setTextNonSelectionColor(White)  
cellRenderer.setTextSelectionColor(White)  
cellRenderer.setBackground(black)  
cellRenderer.setBackgroundNonSelectionColor(black)  
cellRenderer.setBackgroundSelectionColor(black)

btr.viewport.view.background = black

btr.viewport.view.setCellRenderer(cellRenderer)  
btr.setBackground(black)[/code]

I modified the code from this.

[https://inductiveautomation.com/forum/viewtopic.php?f=70&t=14233&p=52321&hilit=tag+tree#p52321](https://inductiveautomation.com/forum/viewtopic.php?f=70&t=14233&p=52321&hilit=tag+tree#p52321)

you can find more info on the Java tree renderer here

[https://docs.oracle.com/javase/7/docs/api/javax/swing/tree/DefaultTreeCellRenderer.html](https://docs.oracle.com/javase/7/docs/api/javax/swing/tree/DefaultTreeCellRenderer.html)

---

<div class="post-metadata">

**Author:** ![Jasonbpong](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Jasonbpong](https://forum.inductiveautomation.com/u/Jasonbpong)\
**Post date:** [January 13, 2016, 12:18am UTC](https://forum.inductiveautomation.com/t/changing-tag-tree-browser-background-font-colour/10968/3 "2016-01-13T00:18:26Z")

</div>

Dear Chris Taylor,

Appreciate your help to solve what I need.

Thanks. 😃

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [August 9, 2019, 7:24am UTC](https://forum.inductiveautomation.com/t/changing-tag-tree-browser-background-font-colour/10968/4 "2019-08-09T07:24:44Z")

</div>

Hi  
Could you please help on how can I change folder, tag icon of tag browse tree?
