Demo

Include these scripts in your HTML header:

<script type="text/javascript" src="cbox.js"></script>

Then, color input boxes, and textboxes with IDs or class names starting with "color_" or "acolor_" or "rgbahex_" or "argbhex_" will turn into color pickers.

<input type="text" value="blue" name="c1" id="color_c1">
OR
<input type="text" value="blue" name="c1" class="color_c1">

<input type="text" value="#ff0000" name="c2" id="acolor_c2">


<input type="text" value="ff0000ff" name="c2" id="rgbahex_c2">


<input type="text" value="ff0000ff" name="c2" id="argbhex_c2">
Native Color Picker:
<input type="color" value="#00ff00" name="c3">