Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Color picker component
branch: master

Merge pull request #6 from repoify/add/repository

Add repository field to readme
latest commit 42ba257509
jongleberry jonathanong authored
Failed to load latest commit information.
test Initial commit
.gitignore Initial commit
History.md add history.md
Makefile Initial commit
Readme.md Initial commit
color-picker.css
component.json add .license property to component.json
index.js add retina support
package.json add repository field to readme
template.html Initial commit
template.js Initial commit

Readme.md

ColorPicker

Simple color picker component. Chuck it on a page, in a Dialog, in a Popover etc.

js color picker component

Installation

$ component install component/color-picker

Example

var ColorPicker = require('color-picker');

var picker = new ColorPicker;
picker.el.appendTo('body');
picker.on('change', function(color){
  $('.rgb').text(color.toString()).css('background', color);
});

Events

  • change (color) when the color selection changes

API

ColorPicker#size(n)

Define the color picker width / height.

ColorPicker#width(n)

Define the color picker width.

ColorPicker#height(n)

Define the color picker height.

ColorPicker#color()

Get the current selected color object with .r, .g, and .b values. The .toString() method on these color objects is the string representation such as "rgb(255,0,0)".

ColorPicker#color(str)

Set the color value to str.

License

MIT

Something went wrong with that request. Please try again.