javascript - How to do an color-picker with just a range of colors -
i trying this:
a colorpicker can pick colors, 40 colors. don't want use eventlistener each color. think should possible <select>
element, how?
i think alot of tinkering specific solution. solution html table containing 40 cell, define color each cell, write code define 1 user has selected, later on use ever purpose need.
if me use this: code from: http://widget.colorcodehex.com/color-picker.html
<div style="font-family: arial,helvetica,sans-serif; border: solid 1px #cccccc; position: absolute; width: 240px; height: 326px; background: #ffffff; -moz-box-shadow: 0 0 6px rgba(0,0,0,.25); -webkit-box-shadow: 0 0 6px rgba(0,0,0,.25); box-shadow: 0 0 6px rgba(0,0,0,.25); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;"> <div style="background-color: #2d6ab4; position: absolute; top: 0px; left: 0px; width: 100%; height: 22px; text-align: center; padding-top: 2px; font-weight: bold; border-top-right-radius: 5px; border-top-left-radius: 5px;"><a style="text-decoration: none; color: #ffffff;" target="_blank" href="http://www.colorcodehex.com/">html color picker</a></div>
with can same result (or in oppion better since user can define whatever color like) don't have sit , table-color-code , user interaction code.
/s
Comments
Post a Comment