1.0.2 • Published 4 years ago

san-color v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

San Color

🎨 San Color Pickers for Sketch, Photoshop, Chrome & more https://helianthuswhite.github.io/san-color/

Installation

Using npm:

$ npm install san-color

Usage

Use every type colorpicker as a san component.

import {Component} from san;
import {Sketch} from 'san-color';

export default class extends Component {
    static template = `
        <template>
            <ui-sketch color="{=color=}" default-color="#108cee" on-change="onColorChange" />
        </template>
    `;

    initData() {
        return {
            color: {}
        };
    }

    onColorChange(color) {
        console.log(color);

        // const color = {
        //     hsl: ...
        //     hsv: ...
        //     hex8: ...
        //     hex: ...
        //     rgba: ...
        //     alpha: ...
        // };
    }
}

License

MIT