vue-ps-colorpicker
v1.0.0
Published
A photoshope style color picker in vue.
Downloads
3
Readme
vue-ps-colorpicker
vue-ps-colorpicker is Photoshop style colorpicker in vue.
Install
The recommended way to install and maintain vue-ps-colorpicker in your project is through the Node.js Pacakge Manager (NPM), simply type the npm command in your project folder:
npm install
Usage
To use vue-ps-colorpicker, you have to import the component
import { PsColorpicker } from 'vue-ps-colorpicker'
// ...
export default {
components: { PsColorpicker },
// ...
}
The colorpicker component takes only one input, with the form of { red: number, green: number, blue: number, alpha: number }, each channel is range from 0 to 1.
<ps-colorpicker :color="color"></ps-colorpicker>
The colorpicker also has a dark style, just add a dark class on the tag.
<ps-colorpicker :color="color" class="dark"></ps-colorpicker>
Demo and Doc
Build demo by
npm run demo
You can view the demos on my Github Pages.
License
Distributed under the MIT license. See LICENSE for detail.