function numputs(){
	cnumR = parseInt(window.document.forms.nums.snum.value.substring(0,2),16);
	cnumG = parseInt(window.document.forms.nums.snum.value.substring(2,4),16);
	cnumB = parseInt(window.document.forms.nums.snum.value.substring(4,6),16);
	// RGB 0-255
	window.document.forms.nums.r255.value=cnumR;
	window.document.forms.nums.g255.value=cnumG;
	window.document.forms.nums.b255.value=cnumB;
	window.document.forms.nums.r1.value=(cnumR/255).toFixed(3);
	window.document.forms.nums.g1.value=(cnumG/255).toFixed(3);
	window.document.forms.nums.b1.value=(cnumB/255).toFixed(3);
	// HSV
	var arr = new Array(cnumR/255,cnumG/255,cnumB/255);
	function sortNumber(a,b)
          {
            return a - b;
          }
	arr.sort(sortNumber);
	var maxN = arr[2];
	var minN = arr[0];
	if (maxN==minN){
		window.document.forms.nums.hd.value=0;
		window.document.forms.nums.h1.value=(0.000).toFixed(3);
	} else if (maxN==(cnumR/255)) {
		var rNum = Math.round((60*(((cnumG/255)-(cnumB/255))/(maxN-minN)))%360);
		rNum < 0 ? rNum = 360+rNum : null;
		window.document.forms.nums.hd.value=rNum
		window.document.forms.nums.h1.value=(rNum/360).toFixed(3);
	} else if (maxN==(cnumG/255)) {
		window.document.forms.nums.hd.value=Math.round((60*(((cnumB/255)-(cnumR/255))/(maxN-minN)))+120);
		window.document.forms.nums.h1.value=(((60*(((cnumB/255)-(cnumR/255))/(maxN-minN)))+120)/360).toFixed(3);
	} else if (maxN==(cnumB/255)) {
		window.document.forms.nums.hd.value=Math.round((60*(((cnumR/255)-(cnumG/255))/(maxN-minN)))+240);
		window.document.forms.nums.h1.value=(((60*(((cnumR/255)-(cnumG/255))/(maxN-minN)))+240)/360).toFixed(3);
	}
	if (maxN==0){
		window.document.forms.nums.sp.value=0;
		window.document.forms.nums.s1.value=(0.000).toFixed(3);
	} else {
		window.document.forms.nums.sp.value=Math.round((maxN-minN)/maxN*100);
		window.document.forms.nums.s1.value=((maxN-minN)/maxN).toFixed(3);
	}
	window.document.forms.nums.vp.value=Math.round(maxN*100);
	window.document.forms.nums.v1.value=maxN.toFixed(3);
}

