In tree sample Appearance -> Dynamical icon/text/style changing
you can set a tree item’s color (using I assume tree.setItemColor)
But how do you set the a tree item’s color from XML? I tried <item … color=‘red’ but this does not work.
You can use
<item id=“some” text=" text here" aCol=“red” sCol=“blue"
where aCol - color of item in normal state, and sCol - color of item in selected state.
Also, you can use @style, which can contain any css rules for related item
<item id=“some” text=” text here" style=“color:red;”