An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![Published on NPM](https://img.shields.io/npm/v/@fooloomanzoo/color-input.svg)](https://www.npmjs.com/package/@fooloomanzoo/color-input)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](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)