What is Color Picker?
Color Picker tool is a DHTML application for choosing color for some elements of your page.
The main aims of color tool are color management, creating color schemes, picking colors, and more.
Many such tools exist on the world wide web, and generally feature a color harmonization interface, a color picker,
RGB and HSL conversion and manipulation, a collection of saved schemes, and other similar characteristics.
Web masters, designers, developers, and professionals that work with other types of screen or print media use
these tools in their work.
Tool what present on this page is just color picker for online applications like myspace profile editors and so on.
HTML Color Picker uses a reduced size version of Prototype Javascript library, producing a smaller size, extremely functional and fast loading in browser. The total size of the application is about 35KB.
Tool is free for use and distribution and it doesn't require developer permission or approval to use.
Feel free to contact me by e-mail address
- SEO Конкурс: антимаулнетизм на maulnet.sevasjack.info
Types of HTML Color Picker
Current tool can be present in four types:
| Cube color picker | Continious color picker | Rainbow picker | Grayscale picker |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
How can I use DHTML Color Picker Tool?
Usage of javascript color tool is simple. Follow the steps below and enjoy!
Include CSS stylesheets and javascript files into your document and create Picker object whenever after page loading:
Call it whenever you need
Color Picker Methods
initialize(options)
Initialization function. Object Constructor Example Creating picker objectvar Picker = new ColorPicker();
live example | comments | up
show(element, selector, pickerType)
Show color picker beside element Parameter object element HTML element (or its ID) where need to show color picker string selector This parameter point for what style selector need to change color. Can be one of the following: color, border, outline, background. Default value is background string pickerType Type of color picker: cube, continious, rainbow or grayscale Example Show rainbow color picker when click span element<span onclick="picker.show(this, 'color', 'rainbow');"></span>
live example | comments | up
hide()
Hide color picker Example Hide picker when some color was choosed
function onPickerClick(color) {
$('stroke_color').style.backgroundColor = color;
$('strokecolor').value = color;
picker.hide();
}
picker.setCallback(onPickerClick);
live example | comments | up
setCallback(callback)
Set callback for color picker Parameter function callback Function what will called when user click some color on the picker Example
function onPickerClick(color) {
$('stroke_color').style.backgroundColor = color;
$('strokecolor').value = color;
picker.hide();
}
picker.setCallback(onPickerClick);
live example | comments | up
Download DHTML Color Picker Tool
Download the full package of DHTML Color Picker.
Please send me your feedback on this tool.
You can leave any comments you have below on the comment area.
Thank you.
DHTML Color Picker Example
Users comments about Color Picker
Leave your comment






Amazing script! I have it working beautifully, but I need 5 color selectors on my webpage. How can I set this up to use it on 5 separate instances?
Hi Benjamin!
Thanks for your comment. I've sent solution to your email address. Will fix my picker soon and upload updates in public.
Regards,
Sergey
Sergey,
Can you also send me the solution for multiple instances on the same page? Looks great!
Thanks,
Steve
I'd also love to know how to use this several times in one page - great script so far, I love it =)
This is one solution that i found for multiple instances on the same page. I hope it helps.
Thanks.
var picker = new ColorPicker();
var tag = 'custom_color';
function onPickerClick(color) {
$('picker_'+tag).style.backgroundColor = color;
$(tag).value = color;
picker.hide();
}
picker.setCallback(onPickerClick);
change
change
change
Sorry for the previous post. So .. here it is again
var picker = new ColorPicker();
var tag = 'custom_color';
function onPickerClick(color) {
$('picker_'+tag).style.backgroundColor = color;
$(tag).value = color;
picker.hide();
}
picker.setCallback(onPickerClick);
change
change
change
are you kidding us? the last two posts are exactly the same , anyway something wrong with this color picker, can you put a full working example anywhere please?
Could you please post an sample HTML file with the full package download?
I tried using multiples ones how you said and it doesn't seem to work. Did you actually try it?