Skip to content

helianthuswhite/san-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🎨 San Color Pickers for Sketch, Photoshop, Chrome & more

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published