Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/egoist/md-colors
- Owner: egoist
- Created: 2019-11-20T09:24:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T14:37:43.000Z (almost 3 years ago)
- Last Synced: 2024-10-10T12:02:14.477Z (28 days ago)
- Topics: color-palette, colors, material, material-design, npm
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.