I have a mesh which i create and color it as per user requirements. I m using HTML5 color picker. I am accessing color value from colorpicker as follows : var colorChosen = $("#colorAgent").val() // it gives value as : "#ff0080" ;
I m removing # making it as hex code as => colorChosen = "0xff0080" When I use following code to make mesh
var material new THREE.MeshBasicMaterial({ color:colorChosen , wireframe_linewidth: 80,vertexColors:THREE.FaceColors, wireframe: false,opacity: 0.8,transparent: true, side: THREE.DoubleSide, visible: true });
it doesn't apply color but if I remove quotes from colorChosen variable (ie colorChosen = 0xff00) it applies color.
Plz tell how to remove quotes so as to color my mesh as per color chosen .
Thanks