https://github.com/fooloomanzoo/color-input
an input for color values
https://github.com/fooloomanzoo/color-input
Last synced: 2 months ago
JSON representation
an input for color values
- Host: GitHub
- URL: https://github.com/fooloomanzoo/color-input
- Owner: fooloomanzoo
- License: mit
- Created: 2018-01-19T08:21:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T00:37:15.000Z (over 7 years ago)
- Last Synced: 2025-03-17T22:58:00.352Z (over 1 year ago)
- Language: JavaScript
- Size: 538 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@fooloomanzoo/color-input)
[](https://www.webcomponents.org/element/@fooloomanzoo/color-input)
_[API & Demo](https://fooloomanzoo.github.io/color-input)_
## \
An input for color. It can use the formats `rgb`, `hsl` or `hex`. Additionally you can use `text` for automatically transform a color-string like `red` to its rgb-representation.
If you are looking for a picker for color, please have a look at [color-picker](https://github.com/fooloomanzoo/color-picker).
### Example
```html
color-input:
color-text-input:
format
auto
rgb
hex
hsl
alpha: [[alpha]]
red: [[r]]
green: [[g]]
blue: [[b]]
hue: [[h]]
saturation: [[s]]
lightness: [[l]]
```
### Styling
Have a look at [input-picker-pattern#input-shared-style](https://github.com/fooloomanzoo/input-picker-pattern#input-shared-style) to see how to style the element.
### Installation
```
npm i --save @fooloomanzoo/color-input
```
### License
[MIT](https://github.com/fooloomanzoo/color-input/blob/master/LICENSE.txt)