Change the color of a object's child or material

I want to change the color of objects child means i want to change the color of materials by name Please do some help Here sample photo is attached for you refrencedescription
I write this code but it’s change the color of object but not the color materials or its child.

object.traverse( function ( child ) {
					if ( child instanceof THREE.Object3D  ) {
						// console.log( +"test");

    					console.log("~ materials ~");
				} );

This code just change the color of object

The material defines what the surface of the object looks like. This means that the material’s color is the object’s color.

1 Like

its mean i just have option of change the color of objects?