Skip to content

Indyandie/svelte-color-well

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svelte color well

A color picker.

Install it

npm i svelte-color-well

Use it

<script>
  // import it to your component/app
  import ColorWell from 'svelte-color-well'

  // your color
  let yourColor
</script>

<!-- use the component initializes with a random color -->
<ColorWell/>

<!-- initialize color and use rbg sliders -->
<ColorWell
  color='red'
  type='rgb'
/>

<!-- bind color to variable -->
<ColorWell bind:color={yourColor} />

<!-- see it in action -->
<h1>{yourColor}</h1>

TODO

  • text input