Updated js file to truncate excess zeros in rgb values