1 | # theme-colors
|
2 |
|
3 | > Easily generate color shades for themes
|
4 |
|
5 | [![codecov][codecov-src]][codecov-href]
|
6 | [![npm version][npm-v-src]][npm-v-href]
|
7 | [![npm downloads][npm-dm-src]][npm-dm-href]
|
8 | [![package phobia][packagephobia-src]][packagephobia-href]
|
9 | [![bundle phobia][bundlephobia-src]][bundlephobia-href]
|
10 |
|
11 | Install:
|
12 |
|
13 | ```bash
|
14 | yarn add theme-colors
|
15 |
|
16 | # or
|
17 |
|
18 | npm i theme-colors
|
19 | ```
|
20 |
|
21 | Usage:
|
22 |
|
23 | ```js
|
24 | import { getColors } from 'theme-colors'
|
25 |
|
26 | const theme = getColors('#ABABAB')
|
27 |
|
28 | // Using rgb
|
29 | const theme = getColors('172,172,172')
|
30 | ```
|
31 |
|
32 | ```js
|
33 | {
|
34 | 50: '#FBFBFB',
|
35 | 100: '#F7F7F7',
|
36 | 200: '#EAEAEA',
|
37 | 300: '#DDDDDD',
|
38 | 400: '#C4C4C4',
|
39 | 500: '#ABABAB',
|
40 | 600: '#9A9A9A',
|
41 | 700: '#676767',
|
42 | 800: '#4D4D4D',
|
43 | 900: '#333333',
|
44 | }
|
45 | ```
|
46 |
|
47 | ## License
|
48 |
|
49 | Inspired by [javisperez/tailwindcolorshades](https://github.com/javisperez/tailwindcolorshades)
|
50 |
|
51 | MIT. Made with 💖
|
52 |
|
53 |
|
54 | [npm-v-src]: https://flat.badgen.net/npm/v/theme-colors/latest
|
55 | [npm-v-href]: https://npmjs.com/package/theme-colors
|
56 |
|
57 | [npm-dm-src]: https://flat.badgen.net/npm/dm/theme-colors
|
58 | [npm-dm-href]: https://npmjs.com/package/theme-colors
|
59 |
|
60 | [packagephobia-src]: https://flat.badgen.net/packagephobia/install/theme-colors
|
61 | [packagephobia-href]: https://packagephobia.now.sh/result?p=theme-colors
|
62 |
|
63 | [bundlephobia-src]: https://flat.badgen.net/bundlephobia/min/theme-colors
|
64 | [bundlephobia-href]: https://bundlephobia.com/result?p=theme-colors
|
65 |
|
66 | [codecov-src]: https://flat.badgen.net/codecov/c/github/nuxt-contrib/theme-colors/master
|
67 | [codecov-href]: https://codecov.io/gh/nuxt-contrib/theme-colors
|