diff --git a/README.md b/README.md index fd0912c..b6cc6a5 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ Svelte Color Picker currently has one type of colorpicker. | ------ | ------ | ------ | | on:colorChange | function | Given function gets called every time color changes | | startColor | string | Initializes color picker with the value (hexadecimal without alpha). | +| width | number | Changes the color picker's width `default: 240` | +| height | number | Changes the color picker's height `default: 265` | License ---- diff --git a/src/HsvPicker.svelte b/src/HsvPicker.svelte index 9e5e1dc..7f69fd6 100644 --- a/src/HsvPicker.svelte +++ b/src/HsvPicker.svelte @@ -2,6 +2,8 @@ import {onMount,createEventDispatcher} from 'svelte'; export let startColor ="#FF0000"; +export let width = 240; +export let height = 265; onMount(() => { document.addEventListener("mouseup", mouseUp); @@ -393,8 +395,6 @@ function rgbToHSV(r, g, b, update) { -