Color
Support color mode list:
- HSL
- HSLA
- RGB
- RGBA
- HSB
We will support CMYK, LAB in feature.
Install
$ npm install @mzmap/color --save
Usage
import Color from '@mzmap/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')