https://github.com/dy/color-tool
Color picker component
https://github.com/dy/color-tool
Last synced: 9 months ago
JSON representation
Color picker component
- Host: GitHub
- URL: https://github.com/dy/color-tool
- Owner: dy
- License: mit
- Created: 2012-09-18T16:44:02.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-06-20T11:20:25.000Z (almost 11 years ago)
- Last Synced: 2025-09-03T23:47:43.437Z (10 months ago)
- Language: JavaScript
- Homepage: http://dfcreative.github.io/color-tool
- Size: 1.74 MB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Multipurpose color picker component. **[Demo](https://dfcreative.github.io/color-tool)**.
[](https://travis-ci.org/dfcreative/color-tool)
[](https://codeclimate.com/github/dfcreative/color-tool)
[](https://david-dm.org/dfcreative/color-tool)
[](http://github.com/badges/stability-badges)
## Use
[](https://nodei.co/npm/color-tool/)
```js
var ColorPicker = require('color-tool');
var Color = require('color2');
var c = new Color('red');
var picker = new ColorPicker({
color: color,
space: 'rgb',
channel: ['red']
});
document.body.appendChild(picker.element);
```
## Options
| Name | Description |
|---|---|
| color | Color instance to use as a model. |
| space | Color space to render. See [list of available spaces](http://github.com/dfcreative/color-space). |
| channel | Color channel(s) to render in color space. Whether string or array. |
| type | Type of color picker to set up: `horizontal`, `vertical`, `rectangular`, `radial`, `polar` or other. |