Plotly reverts color after hovering

I have changed the color of my Treemap by traversing the Plotly.d3 DOM elements and setting the fill of the components which is displayed correctly. However hovering over any element reverts the color that it was before the changes take place.
Any help would be appreciated…
Radek.