JSPM

mdcolor

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q9288F
  • License MIT

Material design color palette meets TinyColor

Package Exports

  • mdcolor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdcolor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

material-design-color-palette

Material design color palette meets TinyColor

npm install --save mdcolor
import MDColor from 'mdcolor';

MDColor.Red(500).toHexString(); // '#f44336'

MDColor.Red(500, 1); // '#F44336' raw value

MDColor.DeepPurple('A700').toHexString() // '#6200ea'

MDColor.White('SecondaryText').toRgbString() // 'rgba(255, 255, 255, 0.7)'

See list of colors: https://github.com/danlevan/google-material-color/blob/master/src/colors.js

TinyColor API: https://github.com/bgrins/TinyColor/blob/master/README.md

Dependencies

google-material-color: https://github.com/danlevan/google-material-color

TinyColor: https://github.com/bgrins/TinyColor