jQuery tiny colour picker plugin with features geared for use in R shiny applications
JavaScript HTML
Pull request Compare This branch is 24 commits ahead, 78 commits behind claviska:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
img
js
README.md
index.html

README.md

jQuery Colour Picker: A tiny colour picker with useful extra features

Copyright 2016 Dean Attali and Cory LaViska. Licensed under the MIT license.

v1.1

This is a jQuery plugin that creates a colour picker from an input field. It is a fork of another plugin with many modifications made to make it more suited to integrate with Shiny and to add some useful features.

Modifications by Dean Attali:

  • Added "limited" palette that allows the user to specify their only a set of allowed colour rather than any colour
  • Added "allowTransparency" setting which allows users to check a checkbox to select the colour "transparent"
  • Added "showColour" setting which determines if to show the selected colour as the text, as the background colour of the input field, or both
  • Added "returnName" setting which makes the widget return a name instead of HEX value when possible
  • Removed many unnecessary features
  • Removed dependency on images and made the colour picker completely CSS

This plugin works for IE8+, Chrome, Firefox, mobile, and should work for all other major browsers.

Modified plugin is being used in colourpicker - an R package providing colour pickers for Shiny apps.

The index.html page contains very basic examples of how to use this plugin.

Live demo

Colour input being used in a shiny application, with the "showColour" and "allowTransparency" features: here