I\'m trying to change the color of a cube based on a variable. I created two cubes and I want to change their color depending on the distance between them.
The cubes
cube.material.color
will give you the THREE.Color object:
Color
which has a bunch of methods you can use to set the color.