rgbaColorPicker now up on GitHub

Earlier this week I needed a color picker, but not just any color picker, I needed one with alpha level transparency support. After searching for a while and finding nothing I decided to create my own. Outside of just doing alpha it also supports colors names and converts colors using tinycolors.js.

Instead of going over the code like I usually do I decided just to put it up on github (rgbaColorPicker on GitHub), that way if anybody can make changes and they can be reintegrated into the master branch. There are some examples of the script up on this site, you can view them here:

You can use the rgbaColorPicker by including the require files (rgbacolorpicker.js and tinycolor-min.js) and either including the seperate stylesheet or adding the styles from it to your existing stylesheet. Then, create an input element and give it the class color picker, the script will do the rest.

As you select a color it will return the value to the input, either as the html color name, the the Hex value, or if there is an alpha as rgba.

This version is pretty basic, but future plans include making it only require a single fine, and giving more options, any suggestion can be posted here, or you can fork the github project and add them yourself and I’ll integrate them if you’d like. For those not interested in the whole github thing, you can get a direct download of the script GitHub rgbaColorPicker Download page.

Leave a Reply

Your email address will not be published. Required fields are marked *