The fork of Svelte Color Picker.
Supporting Two way data binding. Written by TypeScript and SCSS.
With npm
$ cd yourSvelteProject
$ npm i minorin22/svelte-color-picker
In your component :
<script>
import HsvPicker from 'svelte-color-picker/src/HsvPicker.svelte';
function colorCallback(rgba) {
console.log(rgba.detail)
}
</script>
<HsvPicker on:colorChange={colorCallback} startColor={"#FBFBFB"}/>
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). |
MIT