# Reset node color applied with setNodesColors back to original material

**URL:** <https://forum.techsoft3d.com/t/reset-node-color-applied-with-setnodescolors-back-to-original-material/5108>\
**Category:** General\
**Tags:** code, sample, webviewer\
**Created:** [March 17, 2026, 10:55am UTC](https://forum.techsoft3d.com/t/reset-node-color-applied-with-setnodescolors-back-to-original-material/5108 "2026-03-17T10:55:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raja.r](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Post date:** [March 17, 2026, 10:55am UTC](https://forum.techsoft3d.com/t/reset-node-color-applied-with-setnodescolors-back-to-original-material/5108/1 "2026-03-17T10:55:33Z")

</div>

**Post:**

Hi Team,

I am applying colors to nodes using `viewer.model.setNodesColors()` like this:

```auto
const colorMap = new Map();

for (const nodeId of nodeIds) {
  colorMap.set(nodeId, new Communicator.Color(255, 0, 0));
}

await viewer.model.setNodesColors(colorMap);

```

This works correctly and applies the color to the nodes.

Later, I want to **reset the nodes back to their original model colors**. However, if I assign another color like:

```auto
colorMap.set(nodeId, new Communicator.Color(255,255,255));

```

Not working :- not changing the node color to white

Not working:- not restoring the original material color.

What is the correct way to **remove the color override applied by `setNodesColors()` and restore the node’s original color**?

Would passing `null` for the color value be the recommended approach, for example:

```auto
const resetMap = new Map();
for (const nodeId of nodeIds) {
  resetMap.set(nodeId, null);
}

await viewer.model.setNodesColors(resetMap);

```

Is this the correct pattern to restore the original colors?

Also, does this behavior differ for nodes that have **texture mapping** applied?

current version - Hoops Version: 2023\_SP1 this is not working as well. await viewer.model.resetNodesColor();

Thanks!

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [March 17, 2026, 12:51pm UTC](https://forum.techsoft3d.com/t/reset-node-color-applied-with-setnodescolors-back-to-original-material/5108/2 "2026-03-17T12:51:25Z")

</div>

I would expect this call to work:  
`await hwv.model.resetNodesColor();`

As a quick test, I ran your code snippet in the default Web Viewer:  
 ![forum_resetnodescolors](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/4/47b6df478435b3b6af76ec3298ad8c398d402a5d.gif)
