title: Change color of one face of the cube - THREE.js
body: <p>I am learning OOP while using Three.js. I know, a hard way to do it. So i created a box in the scene. Now i want to change color of one face of that cube.</p>
  
  <pre><code>var scene = new THREE.Scene();
  var camera = new THREE.PerspectiveCamera( 100, window.innerWidth/window.innerHeight, 0.1, 1000 );
  camera.position.set(5, 5, 10);
  
  var geo = new THREE.BoxGeometry(5,2,5);
  var mat = new THREE.MeshBasicMaterial({color:0xff0ff0, side:THREE.DoubleSide});
  
  var mesh = new THREE.Mesh( geo, mat);
  scene.add(mesh);
  
  //Right there i want to chance color of the face. Its not working
  mesh.geometry.faces[5].color.setHex( 0xffffff ); 
  
  var edge = new THREE.WireframeHelper( mesh, 0x00ff00 );
  scene.add(edge);
  
  var renderer = new THREE.WebGLRenderer();
  renderer.setSize( window.innerWidth, window.innerHeight );
  document.body.appendChild( renderer.domElement );
  renderer.render(scene, camera);
  </code></pre>
  
  <p><strong>EDIT:</strong> the reason it did not work for me was the color i used <strong>0xffffff</strong>. This program will work unless color is 0xffffff.</p>