' );
colorwin.document.close();
}
function inputval ()
{
var temp='';
if ( document.forms[0].takex[1].checked==true )
{
hexnum=document.forms[0].hex.value.toUpperCase();
for ( var i=0; i<=(hexnum.length-1); i++ )
{
temp += ( hexchars.indexOf(hexnum.charAt(i)) == -1 ? '0' :
hexnum.charAt(i) );
}
if ( hexnum.length < 6 )
{
for ( var i=hexnum.length-1; i<=5; i++)
{
temp += '0';
}
}
hexnum=temp;
rgb();
indexing();
paintit();
}
if ( document.forms[0].takex[0].checked==true )
{
with (Math)
{
temp=''+round(abs(parseFloat(document.forms[0].red.value)));
red=( temp=='NaN' ? 0 : temp );
temp=''+round(abs(parseFloat(document.forms[0].green.value)));
green=( temp=='NaN' ? 0 : temp );
temp=''+round(abs(parseFloat(document.forms[0].blue.value)));
blue=( temp=='NaN' ? 0 : temp );
}
if ( red>255 ) red=255;
if ( green>255 ) green=255;
if ( blue>255 ) blue=255;
hexnum= toHex(red) + toHex(green) + toHex(blue);
indexing();
paintit();
}
}
function inputname ()
{
hexnum=document.forms[0].clrname.options[document.forms[0].clrname.selectedIndex].value;
if ( hexnum=='' )
{
document.forms[0].red.value='';
document.forms[0].green.value='';
document.forms[0].blue.value='';
document.forms[0].hex.value=hexnum;
document.forms[0].takex[0].checked=0;
document.forms[0].takex[1].checked=0;
} else
{
indexing();
rgb();
document.forms[0].takex[0].checked=1;
paintit();
}
}
//-- end -->
COMMENTS: Select the color from the drop down menu and you get a pop-up of that color, plus it tells you the RGB and HEX values for that color.
|