https://github.com/pecuchet/color-range-picker
Simple ES6 colorpicker UI for a chosen set of colors; creates color ranges/shades
https://github.com/pecuchet/color-range-picker
Last synced: 11 months ago
JSON representation
Simple ES6 colorpicker UI for a chosen set of colors; creates color ranges/shades
- Host: GitHub
- URL: https://github.com/pecuchet/color-range-picker
- Owner: pecuchet
- Created: 2018-06-28T14:37:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-09T09:22:23.000Z (almost 8 years ago)
- Last Synced: 2025-07-25T02:22:37.850Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Color Range Picker
Inspired by @wieringen's [tinycolorpicker](https://github.com/wieringen/tinycolorpicker), this small library
renders a color circle from a configurable set of colors and can generate a range of shades from the picked color.
[Demo](https://pecuchet.github.io/color-range-picker/)
## Install
``` npm i color-range-picker --save ```
## Public properties and methods
| Name | Type | Description | Returns |
| ---- | ---- | ----------- | ------- |
| ``hex`` | accessor | Get the hexadecimal notation of the last chosen color | String |
| ``rgb`` | accessor | Get the rgb notation of the last chosen color | String |
| ``RGBToHex(Array/String)`` | static method | Convert a RGB array or string to hexadecimal string | String |
| ``hexToRGB(Array/String)`` | static method | Convert a hexadecimal string to a RGB array | Array/null |
| ``range(Array/String, Number)`` | static method | Generate a range of colors from the currently picked color | Array/null |
| ``getFormat(Array/String)`` | static method | Check the color format | String |
| ``toggle()`` | method | Show or hide the ui | void |
| ``destroy()`` | method | Remove the UI from the DOM | void |