Dynamic Color Chart
- Home
- ASP
- Dynamic Color Chart
Source Code:
<%
dim strScriptName, intStep, strColor, str_rr, str_gg, str_bb
'get the name of the current page
strScriptName = Request.ServerVariables("SCRIPT_NAME")
%>
<form name="MyForm" action= "<%=strScriptName%>?key=1" >
Select Step Size: <select name = "StepSize" size="1">
<option>3</option>
<option>4</option>
<option selected>5</option>
<option>10</option>
</select>
<input type="Submit" Value="Submit">
</form>
<%
If len(Request("StepSize")) then
intStep= Request("StepSize")
for str_rr = 0 to 15 step intStep
for str_gg = 0 to 15 step intStep
Response.write("<table width='100%'><tr>")
for str_bb = 0 to 15 step intStep
strColor="#" & hex(str_rr) & hex(str_rr) & hex(str_gg) & hex(str_gg) & hex(str_bb) & hex(str_bb)
Response.write("<td align='right' width='*'><font face='Courier New' size='2'>" & strColor & "</font></td>")
Response.write("<td width='50' bgcolor=" & strColor & "></td>")
next
Response.write("</tr>")
next
next
Response.write("</table>")
End if
%>
216 colors browser-safe colors 216 browers safe colors 216 non dithering colors how to use colors on the web web colors web page colors