Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/efeskucuk/svelte-color-picker
A color picker component for svelte
https://github.com/efeskucuk/svelte-color-picker
color-picker svelte svelte-v3 sveltejs
Last synced: about 1 month ago
JSON representation
A color picker component for svelte
- Host: GitHub
- URL: https://github.com/efeskucuk/svelte-color-picker
- Owner: efeskucuk
- License: mit
- Created: 2019-07-02T08:42:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T14:51:40.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T02:10:40.793Z (about 1 month ago)
- Topics: color-picker, svelte, svelte-v3, sveltejs
- Language: Svelte
- Homepage:
- Size: 187 KB
- Stars: 105
- Watchers: 3
- Forks: 24
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Svelte Color Picker [\[Demo Page\]](https://efeskucuk.github.io/svelte-color-picker/)
[![svelte-v3](https://img.shields.io/badge/svelte-v3-blueviolet.svg)](https://svelte.dev)
## InstallationWith npm
```sh
$ cd yourSvelteProject
$ npm i svelte-color-picker
```## Usage
In your component :
```jsximport {HsvPicker} from 'svelte-color-picker';
function colorCallback(rgba) {
console.log(rgba.detail)
}```
## Components
Svelte Color Picker currently has one type of colorpicker.
#### \
| Props | Value Type | Use |
| ------ | ------ | ------ |
| on:colorChange | function | Given function gets called every time color changes |
| startColor | string | Initializes color picker with the value (hexadecimal without alpha). |License
----MIT