mz-color
v0.0.2
Published
Easy way to convert color.
Downloads
2
Readme
MZ-Color
Support color mode list:
- HSL
- HSLA
- RGB
- RGBA
- HSB
We will support CMYK, LAB in feature.
Install
$ npm install mz-color --save
Usage
import Color from 'mz-color'
Create color methods
- fromRGB
- fromRGBA
- fromHSL
- fromHSLA
- fromHSB
Get color array
- toRGB
- toRGBA
- toHSL
- toHSL
- toHSB
Get color string
// rgb(255, 255, 255) ==> rgba(255, 255, 255, 1)
Color.fromRGB('rgb(255, 255, 255)').toString('rgba')