Well, I had a try in black and white. Tell me what ya think.
I know there might be a lot of useless stuff in there and bad stuff but you know, it's the first version of the script and it's late. I might clean it up tomorrow, gotta go to bed.
Enjoy.
Code:
<html>
<head>
<script type="text/javascript">
<!--
function appear()
{
xPos=event.clientX;
yPos=event.clientY;
color_box.style.visibility="visible";
color_box.style.left=xPos;
color_box.style.top=yPos;
}
function change(new_color)
{
document.bgColor=new_color;
color_box.style.visibility="hidden";
}
function convert(c)
{
return parseInt(c, 10).toString(16);
}
-->
</script>
</head>
<body>
<table id="color_box" align="center" border="0" cellpading="0" cellspacing="1" style="visibility: hidden; position: absolute;">
<tr>
<script type="text/javascript">
<!--
for (c = 0; c <= 255; c++)
{
n=convert(c)
if (n < 10)
{
n="0"+n
}
else
{
n=n
}
if (c%16 == 0){
document.write("</tr><tr>")
}
m=n.toUpperCase()
t="#";
b=t+n+n+n.toString();
l='<td width="10px" height="10px" onClick="change(\''+b+'\')" bgcolor="#'+n+n+n+'" title="'+m+m+m+'"></td>'
document.write(l)
}
-->
</script>
</tr>
</table>
<a href="#" onClick="appear()">Click to change</a>
</body>
</html>
Cya
btw, when you see this line:
l='<td width="10px" height="10px" onClick="change(\''+b+'\')" bgcolor="#'+n+n+n+'" title="'+m+m+m+'"></td>'
there sould be an upside down / here: change(
upside down / ''+b... and here: b+'
upsidedown /')"...
For some reason, it doesn't appear when I post. Can someone explain?