GithubHelp home page GithubHelp logo

chrisb85 / jquery-colourpicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daattali/jquery-colourpicker

0.0 1.0 0.0 953 KB

jQuery tiny colour picker plugin with features geared for use in R shiny applications

Home Page: http://daattali.com/shiny/colourInput/

JavaScript 87.09% HTML 4.83% CSS 8.07%

jquery-colourpicker's Introduction

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

Copyright 2017 Dean Attali, David Griswold and Cory LaViska. Licensed under the MIT license.

v1.5

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 "allowTransparent" 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
  • Added "closeOnClick" settings which closes the selection panel after a colour has been selected
  • Removed many unnecessary features
  • Removed dependency on images and made the colour picker completely CSS

Additional modifications by David Griswold:

  • Added "allowAlpha" option that allows the user to select colours with an alpha transparency channel
  • Made inputs more flexible by allowing colours to be entered as names or as hex, rgb, rgba, hsl, or hsla strings

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.