# material-colors-object

> A plain Javascript object containing Material Design Color Palette data. Supports minimum contrast and light & dark variants.

Latest version **1.0.0** (published 2018-08-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install material-colors-object
pnpm add material-colors-object
yarn add material-colors-object
bun add material-colors-object
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-08-04 |
| First published | 2018-08-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 42.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alex Mercier |
| Maintainers | amercier |
| Keywords | colors, palette, material, design, javascript, plain, object |

## Links

- npm: https://www.npmjs.com/package/material-colors-object
- Repository: https://github.com/amercier/material-colors-object
- Homepage: https://github.com/amercier/material-colors-object#readme
- Issues: https://github.com/amercier/material-colors-object/issues
- npm.io page: https://npm.io/package/material-colors-object

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-08-04
- 1.0.0-alpha.2 — 2018-08-04
- 1.0.0-alpha.1 — 2018-08-04

## README

material-colors-object
======================

> A plain Javascript object containing [Material Design Color Palette](https://material.io/design/color/the-color-system.html#tools-for-picking-colors) data. Supports minimum contrast and light & dark variants.

[![Latest Stable Version](https://img.shields.io/npm/v/material-colors-object.svg)](https://www.npmjs.com/package/material-colors-object)
[![dependencies Status](https://david-dm.org/amercier/material-colors-object/status.svg)](https://david-dm.org/amercier/material-colors-object)
[![Build Status](https://img.shields.io/travis/amercier/material-colors-object/master.svg)](https://travis-ci.org/amercier/material-colors-object)
[![Test Coverage](https://img.shields.io/codecov/c/github/amercier/material-colors-object/master.svg)](https://codecov.io/github/amercier/material-colors-object?branch=master)

Installation
------------

Prerequisites: [Node.js](https://nodejs.org/) (any version), **npm** (any version).

    npm install --save material-colors-object

Usage
-----

```js
const materialColors = require('material-colors-object');
console.log(materialColors);
```

```js
{
  red: {
    name: 'Red',
    shades: {
      '50': {
        value: '#ede7f6',      // Regular color (no variant)
        isDark: false,         // Legible with dark foreground color
        lightValue: '#ffffff', // Light variant
        darkValue: '#bbb5c3'   // Dark variant
      },
      // ...
      '500': {
        value: '#f44336',
        isDark: true,          // Light foreground color recommended
        lightValue: '#ff7961',
        darkValue: '#ba000d'
      },
      // ...
      '900': { /* ... */ },
      a100: { /* ... */ },
      a200: { /* ... */ },
      a400: { /* ... */ },
      a700: { /* ... */ }
    }
  },
  pink: {
    name: 'Pink',
    shades: { /* ... */ }
  },
  purple: {
    name: 'Purple',
    shades: { /* ... */ }
  },
  deep-purple: {
    name: 'Deep purple',
    shades: { /* ... */ }
  },
  // ...
  black: {
    name: 'Black',
    value: '#000000'
  },
  white: {
    name: 'White',
    value: '#ffffff'
  }
}
```

Notes
-----

### Parsing

Data is generated at build time by parsing HTML code from <https://material.io/design/color/the-color-system.html> and stored in a json file, which is then published. No HTTP requests is made either during installation or runtime.

### Dark & light variants

[chroma.js](http://gka.github.io/chroma.js/) library is used to generate light and dark variant. This is the same library that is used by the [Official Material Color Tool](https://material.io/tools/color/#!/).

References
----------

- [Official Material Color Documentation](https://material.io/design/color/the-color-system.html)
- [Official Material Color Tool](https://material.io/tools/color/#!/)

Contributing
------------

Please refer to the [guidelines for contributing](./CONTRIBUTING.md).

[![devDependencies Status](https://david-dm.org/amercier/material-colors-object/dev-status.svg)](https://david-dm.org/amercier/material-colors-object?type=dev)

License
-------

[![License](https://img.shields.io/npm/l/material-colors-object.svg)](LICENSE.md)

---
<sup>_Created with [npm-package-skeleton](https://github.com/amercier/npm-package-skeleton)._</sup>

---
_Source: https://npm.io/package/material-colors-object · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
