javascript| Script
The color of the website is the important problem that the website construction must consider seriously. The use of the site's color can often reflect the characteristics of a website and artistic style. Therefore, when designing a Web page, you often need to set the color of the page background or other page elements, and the web design software (such as Dreamweaver) has a palette of more than 200 color samples to choose from. If you're designing a Web page with a bit of color, you can use JavaScript script to make your own color spectrum, which will make your design work much easier.
The color of the website is the important problem that the website construction must consider seriously. The use of the site's color can often reflect the characteristics of a website and artistic style. Therefore, when designing a Web page, you often need to set the color of the page background or other page elements, and the web design software (such as Dreamweaver) has a palette of more than 200 color samples to choose from. If you're designing a Web page with a bit of color, you can use JavaScript script to make your own color spectrum, which will make your design work much easier.
The HTML code and JavaScript script that displays the Chromatogram are as follows:
<HTML>
<HEAD>
<TITLE> Chromatogram Chart </TITLE>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
</HEAD>
<body bgcolor= "#FFFFFF" >
<CENTER>
<script language= "JavaScript" >
Defining an Array Object
Clr=new Array (', ', ', ', ', ', ', ' A0 ', ' C0 ', ' FF ');
Create a table with 8 8 rows and 8 columns
for (i=0;i<8;i++) {
Create a table with cells filled in 8 pixels
document.write ("<table border=1 cellpadding=8>");
for (j=0;j<8;j++) {
document.write ("<tr>");
for (k=0;k<8;k++) {
Set the background color of a table cell
document.write (' <td bgcolor= "# ' +clr[i]+clr[j]+clr[k]+ '" > ');
Set Text color
document.write (' <tt><font color= "# ' +clr[7-i]+clr[7-j]+clr[7-k]+ '" > ');
Display 16 in color values
document.write (' # ' +clr[i]+clr[j]+clr[k]+ ' </font></tt></td> '); }
document.write ("</tr>"); }
document.write ("</table><br>"); }
</SCRIPT>
</CENTER>
</BODY>
</HTML>
Click here to see 512 color chromatogram. The chromatogram consists of 8 tables, each of which has 64 colors. When applied, copy the 16 color value of the color you selected in the Chromatogram, and paste it into the color code box.