JSPM

color-tool

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

Multipurpose color picker component

Package Exports

  • color-tool

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 (color-tool) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Multipurpose color picker component. Demo.

alt alt alt unstable

Use

NPM

    var ColorPicker = require('color-tool');
    var Color = require('color2');

    var c = new Color('red');

    var picker = new ColorPicker({
        color: color,
        space: 'rgb',
        channel: ['red']
    });

    document.body.appendChild(picker.element);

Options

Name Description
color Color instance to use as a model.
space Color space to render. See list of available spaces.
channel Color channel(s) to render in color space. Whether string or array.
type Type of color picker to set up: horizontal, vertical, rectangular, radial, polar or other.