When used like thisin threejs
const INITIAL_BODY_MTL = new THREE.MeshPhongMaterial({ color: 0x374047, shininess: 10 });
It is creating a object with changing color codes
{
"color": {
"r": 0.21568627450980393,
"g": 0.25098039215686274,
"b": 0.2784313725490196
},
How to change that to normal HEX. As I searched and found those are float64 format But I am unable to convert to HEX using Javascript