FowlerConsulting
Vendor
I am looking to make a color picker and review before submit for a site theme admin tool.
I would like to have something display the color in addition to the HEX value in the text box in the color below. If you would point me to some source code that provides a good color picker and review, I would appreciate it.
Steven Fowler, Principal
steve.fowler@fowlerconsulting.com
- Development, Training, and Consulting
I would like to have something display the color in addition to the HEX value in the text box in the color below. If you would point me to some source code that provides a good color picker and review, I would appreciate it.
Code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function showColor(val) {
document.Form1.colorvalue.value = val;
}
// End -->
</script>
</HEAD>
<BODY>
<form name="Form1">
<table border=0 bgcolor="FFFFFF">
<tr>
<td>Background Color:</font></td>
<td><input type="text" name="colorvalue" size=10></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%
dim intTableCellWidth, intTableCellHeight
dim intBlue, intGreen, intRed, strColor
dim aryColors(6)
aryColors(1) = "00"
aryColors(2) = "33"
aryColors(3) = "66"
aryColors(4) = "99"
aryColors(5) = "CC"
aryColors(6) = "FF"
for intBlue = 1 to 6
%><tr><%
for intGreen = 1 to 6
for intRed = 1 to 6
strColor = aryColors(intRed) & aryColors(intGreen) & aryColors(intBlue)
%><td width="15" height="15" align="center" bgcolor="<%=strColor%>" onmousedown="javascript:showColor('#<%=strColor%>')"></td><%
next
next
%><tr><%
Response.write(vbCrLF)
next
%>
</table>
<font face="<%=session("Font_Face")%>" color="FF0000" size="-2">
Click a box and the hexadecimal color will be shown below.</font><br>
</form>
</BODY>
</HTML>
steve.fowler@fowlerconsulting.com
- Development, Training, and Consulting