Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/egoist/md-colors

Material design color palettes as an npm package
https://github.com/egoist/md-colors

color-palette colors material material-design npm

Last synced: 16 days ago
JSON representation

Material design color palettes as an npm package

Awesome Lists containing this project

README

        

# Material Design Color Palettes

https://material.io/design/color/the-color-system.html

## Install

This package actually only contains a [JSON file](./colors.json).

```bash
yarn add @egoist/md-colors --dev
```

## Usage

### Using with TailwindCSS

In your `tailwind.config.js`:

```js
const colors = require('@egoist/md-colors')

module.exports = {
theme: {
// Override default colors here
colors
}
}
```

Color names are camelCased, e.g. `deepPurple` and `lightBlue`, you can reference one via `text-lightBlue-200` in TailwindCSS.

### TypeScript support

To load this module in a `.ts` file:

```ts
// Individual imports
import { red, green } from '@egoist/md-colors'

// Or load everything
import * as colors from '@egoist/md-colors'
```

## License

MIT.