0.0.5 • Published 3 years ago
@apsc/color v0.0.5
A set of Svelte components for picking and editing colors
- no inline styles
- the module exports functions for color conversion from/to hex/rgb/hsl/hsv color space. See
utils.d.tsfor definitions of types and functions.
Includes components:
ColorPicker-- a component for picking a color with transparencyColorEdit-- allow edit color value via input fields
Inspired by:
Docs & Demo • API
Install
NPM
npm i -D @apsc/colorPNPM
pnpm add -D @apsc/colorUsage
ColorPicker
<script>
let color='#f00';
</script>
<ColorPicker bind:color />Basic styles are described in the color-picker.css file.
ColorEdit
<script>
let color='#f00';
</script>
<ColorEdit bind:color />Basic styles are described in the color-edit.css file.