@mzmap/color

0.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @mzmap/color

Weekly Downloads

0

Version

0.0.3

License

Apache License 2.0

Unpacked Size

6.18 kB

Total Files

3

Last publish

Collaborators

  • zhangkaiqiang