<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>红鹦鹉-调色板工具</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body{
font-size: 9pt; font-family:Arial; 
background-color:#d4d0c8;
}
td,select,div,span,button { font-size: 9pt; font-family:Arial; }
BUTTON {width:5em; border-width: 1pt; }
input { border: 1pt solid black; font-size: 9pt; background:url("inputbg.gif"); padding:1pt 3pt;}
.title {font-weight:bold}
a:link { color: #0000BB }
a:visited { color: #0000BB }
.boxNormal {border:1px solid #d4d0c8}
.boxOver {border-width:1px;border-color:#ffffff #000000 #000000 #ffffff;border-style:solid}
.boxSelected {border-width:1px;border-color:#000000 #ffffff #ffffff #000000;border-style:inset}

.boxNormal {border:1px solid #d4d0c8}
.boxOver {border-width:1px;border-color:#ffffff #000000 #000000 #ffffff;border-style:solid}
.boxSelected {border-width:1px;border-color:#000000 #ffffff #ffffff #000000;border-style:inset}

-->
</style>

<script type="text/javascript">
document.oncontextmenu=new Function('event.returnValue=false;'); 
var SelRGB = '#000000';
var DrRGB = '';
var SelGRAY = '120';

var hexch = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');

function ToHex(n)
{	var h, l;

	n = Math.round(n);
	l = n % 16;
	h = Math.floor((n / 16)) % 16;
	return (hexch[h] + hexch[l]);
}

function DoColor(c, l)
{ var r, g, b;

  r = '0x' + c.substring(1, 3);
  g = '0x' + c.substring(3, 5);
  b = '0x' + c.substring(5, 7);
  
  if(l > 120)
  {
    l = l - 120;

    r = (r * (120 - l) + 255 * l) / 120;
    g = (g * (120 - l) + 255 * l) / 120;
    b = (b * (120 - l) + 255 * l) / 120;
  }else
  {
    r = (r * l) / 120;
    g = (g * l) / 120;
    b = (b * l) / 120;
  }

  return '#' + ToHex(r) + ToHex(g) + ToHex(b);
}

function EndColor()
{ var i;

  if(DrRGB != SelRGB)
  {
    DrRGB = SelRGB;
    for(i = 0; i <= 30; i ++)
      GrayTable.rows(i).bgColor = DoColor(SelRGB, 240 - i * 8);
  }

  SelColor.value = DoColor(RGB.innerText, GRAY.innerText);
  ShowColor.bgColor = SelColor.value;
}



var s_CurrBoxID = "";
function BoxMouseOut(obj){
	if (obj.id==s_CurrBoxID){
		obj.className = "boxSelected";
	}else{
		obj.className = "boxNormal";
	}
}

function BoxMouseOver(obj){
	if (obj.id==s_CurrBoxID){
		obj.className = "boxSelected";
	}else{
		obj.className = "boxOver";
	}
}

function BoxClick(obj, notSel){
	if (obj.id==s_CurrBoxID){
		return;
	}else{
		if (s_CurrBoxID){
			document.all(s_CurrBoxID).className = "boxNormal";
		}

		s_CurrBoxID = obj.id;
		obj.className = "boxSelected";
	
	}
	    SelRGB = event.srcElement.bgColor;
        RGB.innerText = SelRGB;
		
		SelGRAY ="120";
		GRAY.innerText = "120";
        EndColor();

}

</script>

<script LANGUAGE=JavaScript FOR=ColorTable EVENT=onclick>
   if (s_CurrBoxID==''){
		
	}else{
		document.all(s_CurrBoxID).className = "boxNormal";
		s_CurrBoxID = "";
	}

  SelRGB = event.srcElement.bgColor;
  EndColor();
</script>

<script LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseover>
  RGB.innerText = event.srcElement.bgColor.toUpperCase();
  EndColor();
</script>

<script LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseout>
  RGB.innerText = SelRGB;
  EndColor();
</script>

<script LANGUAGE=JavaScript FOR=GrayTable EVENT=onclick>
  SelGRAY = event.srcElement.title;
  EndColor();
</script>

<script LANGUAGE=JavaScript FOR=GrayTable EVENT=onmouseover>
  GRAY.innerText = event.srcElement.title;
  EndColor();
</script>

<script LANGUAGE=JavaScript FOR=GrayTable EVENT=onmouseout>
  GRAY.innerText = SelGRAY;
  EndColor();
</script>

<script LANGUAGE=JavaScript FOR=Ok EVENT=onclick>
  window.returnValue = SelColor.value;
  window.close();
</script>

</HEAD>
<BODY bgcolor=menu>

<table width="0" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><TABLE ID=ColorTables BORDER=0 CELLSPACING=0 CELLPADDING=0 style='cursor:pointer'>
<tr>
		<td width="24" height="26" valign="top" background="../../images/space.gif" bgColor="#000000" class="boxNormal" id="cbox_000000" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#993300" class="boxNormal" id="cbox_993300" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#333300" class="boxNormal" id="cbox_333300" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#003300" class="boxNormal" id="cbox_003300" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#003366" class="boxNormal" id="cbox_003366" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#000080" class="boxNormal" id="cbox_000080" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#333399" class="boxNormal" id="cbox_333399" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#333333" class="boxNormal" id="cbox_333333" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#800000" class="boxNormal" id="cbox_800000" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FF6600" class="boxNormal" id="cbox_FF6600" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#808000" class="boxNormal" id="cbox_808000" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#008000" class="boxNormal" id="cbox_008000" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#008080" class="boxNormal" id="cbox_008080" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#0000FF" class="boxNormal" id="cbox_0000FF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#666699" class="boxNormal" id="cbox_666699" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#808080" class="boxNormal" id="cbox_808080" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FF0000" class="boxNormal" id="cbox_FF0000" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FF9900" class="boxNormal" id="cbox_FF9900" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#99CC00" class="boxNormal" id="cbox_99CC00" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#339966" class="boxNormal" id="cbox_339966" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#33CCCC" class="boxNormal" id="cbox_33CCCC" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#3366FF" class="boxNormal" id="cbox_3366FF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#800080" class="boxNormal" id="cbox_800080" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#999999" class="boxNormal" id="cbox_999999" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FF00FF" class="boxNormal" id="cbox_FF00FF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FFCC00" class="boxNormal" id="cbox_FFCC00" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FFFF00" class="boxNormal" id="cbox_FFFF00" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#00FF00" class="boxNormal" id="cbox_00FF00" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#00FFFF" class="boxNormal" id="cbox_00FFFF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#00CCFF" class="boxNormal" id="cbox_00CCFF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#993366" class="boxNormal" id="cbox_993366" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#C0C0C0" class="boxNormal" id="cbox_C0C0C0" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FF99CC" class="boxNormal" id="cbox_FF99CC" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FFCC99" class="boxNormal" id="cbox_FFCC99" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FFFF99" class="boxNormal" id="cbox_FFFF99" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
	<tr>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#CCFFCC" class="boxNormal" id="cbox_CCFFCC" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#CCFFFF" class="boxNormal" id="cbox_CCFFFF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#99CCFF" class="boxNormal" id="cbox_99CCFF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#CC99FF" class="boxNormal" id="cbox_CC99FF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
		<td width="24" height="26" valign="top" background="../images/space.gif" bgcolor="#FFFFFF" class="boxNormal" id="cbox_FFFFFF" onClick="BoxClick(this)" onMouseOver="BoxMouseOver(this)" onMouseOut="BoxMouseOut(this)"><img src="../images/gli.gif" width=1 height=1></td>
	</tr>
</TABLE></td>
    <td><div align="center"><center>
<table border="0" cellspacing="10" cellpadding="0"><tr><td>
<TABLE ID=ColorTable BORDER=0 CELLSPACING=0 CELLPADDING=0 style='cursor:pointer'>
<script LANGUAGE=JavaScript>
function wc(r, g, b, n)
{
	r = ((r * 16 + r) * 3 * (15 - n) + 0x80 * n) / 15;
	g = ((g * 16 + g) * 3 * (15 - n) + 0x80 * n) / 15;
	b = ((b * 16 + b) * 3 * (15 - n) + 0x80 * n) / 15;

	document.write('<TD BGCOLOR=#' + ToHex(r) + ToHex(g) + ToHex(b) + ' height=8 width=8></TD>');
}

var cnum = new Array(1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0);

  for(i = 0; i < 16; i ++)
  {
     document.write('<TR>');
     for(j = 0; j < 30; j ++)
     {
     	n1 = j % 5;
     	n2 = Math.floor(j / 5) * 3;
     	n3 = n2 + 3;

     	wc((cnum[n3] * n1 + cnum[n2] * (5 - n1)),
     		(cnum[n3 + 1] * n1 + cnum[n2 + 1] * (5 - n1)),
     		(cnum[n3 + 2] * n1 + cnum[n2 + 2] * (5 - n1)), i);
     }

     document.writeln('</TR>');
  }
</script>
</TABLE></td><td>
<TABLE ID=GrayTable BORDER=0 CELLSPACING=0 CELLPADDING=0 style='cursor:hand'>
<script LANGUAGE=JavaScript>
  for(i = 255; i >= 0; i -= 8.5)
     document.write('<TR BGCOLOR=#' + ToHex(i) + ToHex(i) + ToHex(i) + '><TD TITLE=' + Math.floor(i * 16 / 17) + ' height=4 width=20></TD></TR>');
</script>
</TABLE>
</td></tr>
</table>
</center></div>

<div align="center"><center>
<table border="0" cellspacing="10" cellpadding="0" width="100%">
<tr><td rowspan="2" align="center" width=70>
<table ID=ShowColor bgcolor="#000000" border="1" width="50" height="40" cellspacing="0" cellpadding="0">
<tr><td></td></tr>
</table>
</td>
<td rowspan="2">基色 : <SPAN ID=RGB>#000000</SPAN><BR>
亮度 : <SPAN ID=GRAY>120</SPAN><BR>
代码 : <INPUT TYPE=TEXT SIZE=7 ID=SelColor value="#000000"></td>
<td width=50><BUTTON id=Ok type=submit>确定</BUTTON></td></tr>
<tr><td width=50><BUTTON onclick=window.close();>关闭</BUTTON></td></tr>
</table>

</center></div></td>
  </tr>
</table>
</BODY>   
</HTML>