A simple color picker application written in pure JavaScript, for modern browsers.
Has support for touch events. Touchy… touchy…
This project exists thanks to all the people who contribute.
Become a financial contributor and help us sustain our community.
Support this project with your organization. Your logo will show up here with a link to your website.
- Modernize syntax.
- Make color picker tweaks reusable by wrapping them in a function.
- Fixed minified code does not yet updated after release.
- Removed
CP._
method. - Small bug fixes.
- Added transition effect example.
- Removed opacity value rounding internally.
- Updated to pass the Firefox extension validator (#57)
- Updated the donation target.
- Fixed common issue with ES6 module which does not reference the
this
scope towindow
object by default.
- Added ability to clear the hook storage object if it’s empty.
- Added
blur
andfocus
hook that removedstate.e
option.
- Added
CP.state
property to set initial state globally.
- Renamed
state.events
tostate.e
.
- Removed
CP.each()
method. - Renamed
CP.__instance__
toCP.instances
.
- Removed
change:sv
,change:h
,start:sv
,start:h
,drag:sv
,drag:h
,stop:sv
,stop:h
hooks. - Hooks function arguments is now contains red, green, blue and alpha color value instead of static hex color string value.
- Reduced file size by removing all color supports other than hex.
- Fixed #48
- Changed to CSS flexbox for layout.
- Trigger
enter
andexit
hooks onenter
andexit
method call. - Removed the instance parameter in the first function argument of the hook and move the
this
scope in the function body to the current color picker instance.
- Renamed
target
property tosource
andpicker
property toself
.
- Automatic color picker size based on container’s font size.
- Renamed
trigger
method tofire
.
- Fixed color picker panel position using
HTMLElement.prototype.getBoundingClientRect()
by @flamestream and @alex3683 #29
- Allow users to change the plugin name from
CP
to another.
- Allow users to override the
fit
method.
- Converted all color converters into static function.
- Added static
__instance__
property to collect all of the color picker instance.
- Fixed Chrome bug with desktop events #9
- Fixed
event.stopPropagation()
issue #8
- Added
change
hook.
- Initial release.