# Dynamically alter multiple meshes color with one THREE.Color?

**URL:** <https://discourse.threejs.org/t/dynamically-alter-multiple-meshes-color-with-one-three-color/11725>\
**Category:** Questions\
**Tags:** color, mesh\
**Created:** [December 25, 2019, 9:10pm UTC](https://discourse.threejs.org/t/dynamically-alter-multiple-meshes-color-with-one-three-color/11725 "2019-12-25T21:10:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jojoghaida](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jojoghaida/32/4179_2.png) [@jojoghaida](https://discourse.threejs.org/u/jojoghaida)\
**Post date:** [December 25, 2019, 9:10pm UTC](https://discourse.threejs.org/t/dynamically-alter-multiple-meshes-color-with-one-three-color/11725/1 "2019-12-25T21:10:02Z")

</div>

I’m trying to have my scene dark mode compatible. I have set an interval timer to check is dark mode had been enabled and it then changes a javascript object which contains several THREE.colors which I use throughout my scene on multiple meshes. When triggered, I change the THREE.Colors with .set() the color updates but doesn’t effect the mesh materials who use that THREE.Color. Are the meshes and the THREE.Color in their .color property not dynamically linked? is there a specific way to update so that the color change propagates to all meshes the use it in the scene?

Would greatly appreciate any help to know if this is possible.  
Merry Christmas!

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [December 25, 2019, 9:17pm UTC](https://discourse.threejs.org/t/dynamically-alter-multiple-meshes-color-with-one-three-color/11725/2 "2019-12-25T21:17:29Z")

</div>

Could you share your code? The `.color` properties _could_ be shared, but it depends how you created the materials. Passing the same Color instance to the constructors wouldn’t do it, I don’t think. Try `material.color = color` instead. Or you could just update the colors on each material with `color.copy( refColor )`.

merry christmas! 🙂

---

<div class="post-metadata">

**Author:** ![jojoghaida](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jojoghaida/32/4179_2.png) [@jojoghaida](https://discourse.threejs.org/u/jojoghaida)\
**Post date:** [December 26, 2019, 6:43am UTC](https://discourse.threejs.org/t/dynamically-alter-multiple-meshes-color-with-one-three-color/11725/3 "2019-12-26T06:43:34Z")

</div>

Yes thank you. I’ve run into the problem of the constructor not following original inputs before… it’s a sneaky problem. Really appreciate the help
