0.0.2 • Published 6 years ago

mz-color v0.0.2

Weekly downloads
-
License
Apache License 2....
Repository
-
Last release
6 years ago

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')