Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bgrins/spectrum
The No Hassle JavaScript Colorpicker
https://github.com/bgrins/spectrum
Last synced: 9 days ago
JSON representation
The No Hassle JavaScript Colorpicker
- Host: GitHub
- URL: https://github.com/bgrins/spectrum
- Owner: bgrins
- License: mit
- Created: 2011-07-23T20:39:28.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2022-07-08T10:53:23.000Z (over 2 years ago)
- Last Synced: 2024-04-14T13:39:00.289Z (7 months ago)
- Language: JavaScript
- Homepage: https://bgrins.github.io/spectrum/
- Size: 1.91 MB
- Stars: 2,308
- Watchers: 93
- Forks: 592
- Open Issues: 229
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - bgrins/spectrum - The No Hassle JavaScript Colorpicker (others)
README
# Spectrum
## The No Hassle ColorpickerSee the demo and docs: http://bgrins.github.io/spectrum.
I wanted a colorpicker that didn't require images, and that had an API that made sense to me as a developer who has worked with color in a number of applications. I had tried a number of existing plugins, but decided to try and make a smaller, simpler one.
I started using canvas, then switched to CSS gradients, since it turned out to be easier to manage, and provided better cross browser support.
### Basic Usage
Head over to the [docs](http://bgrins.github.io/spectrum) for more information. There is a visual demo of the different options hosted at: http://bgrins.github.io/spectrum.
$("#colorpicker").spectrum({
color: "#f00"
});
### npm
Spectrum is registered as package with npm. It can be installed with:
npm install spectrum-colorpicker
### Bower
Spectrum is registered as a package with [Bower](http://bower.io/), so it can be pulled down using:
bower install spectrum
### Using spectrum with a CDN
CDN provided by [cdnjs](https://cdnjs.com/libraries/spectrum)
### Continuous Integration
[![Build Status](https://secure.travis-ci.org/bgrins/spectrum.png?branch=master)](http://travis-ci.org/bgrins/spectrum)
Visit https://travis-ci.org/bgrins/spectrum to view the status of the automated tests.
### Building Spectrum Locally
If you'd like to download and use the plugin, head over to http://bgrins.github.io/spectrum/ and click the 'Download Zip' button.
If you'd like to run the development version, spectrum uses Grunt to automate the testing, linting, and building. Head over to http://gruntjs.com/getting-started for more information. First, clone the repository, then run:
npm install -g grunt-cli
npm install# runs jshint and the unit test suite
grunt# runs jshint, the unit test suite, and builds a minified version of the file.
grunt build### Internationalization
If you are able to translate the text in the UI to another language, please do! You can do so by either [filing a pull request](https://github.com/bgrins/spectrum/pulls) or [opening an issue]( https://github.com/bgrins/spectrum/issues) with the translation. The existing languages are listed at: https://github.com/bgrins/spectrum/tree/master/i18n.
For an example, see the [Dutch translation](i18n/jquery.spectrum-nl.js).