JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 59
  • Score
    100M100P100Q65844F
  • License MIT

A set of Svelte components for picking and editing colors

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@apsc/color) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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.ts for definitions of types and functions.

    Includes components:

    • ColorPicker -- a component for picking a color with transparency
    • ColorEdit -- allow edit color value via input fields

    Inspired by:

    Docs & DemoAPI

    Install

    NPM

    npm i -D @apsc/color

    PNPM

    pnpm add -D @apsc/color

    Usage

    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.