@mantine-vue/colors-generator 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @mantine-vue/colors-generator
|
|
2
|
+
|
|
3
|
+
A small library that generates 10 shades of a color from a single provided color value, powered by [chroma.js](https://gka.github.io/chroma.js/). This is the same logic used by the color generator tool on [mantine-vue.dev](https://mantine-vue.dev/colors-generator).
|
|
4
|
+
|
|
5
|
+
> Mantine Vue is an independent community port of [Mantine](https://mantine.dev/) for Vue 3. It is not affiliated with or endorsed by the Mantine team.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
yarn add @mantine-vue/colors-generator chroma-js
|
|
11
|
+
|
|
12
|
+
# or with npm
|
|
13
|
+
npm i @mantine-vue/colors-generator chroma-js
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { generateColors } from '@mantine-vue/colors-generator'
|
|
20
|
+
|
|
21
|
+
const shades = generateColors('#1971c2')
|
|
22
|
+
// ['#e7f5ff', '#d0ebff', ..., '#1971c2', ...]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Try it
|
|
26
|
+
|
|
27
|
+
Interactive version: [mantine-vue.dev/colors-generator](https://mantine-vue.dev/colors-generator)
|
|
28
|
+
|
|
29
|
+
## Peer dependencies
|
|
30
|
+
|
|
31
|
+
- `chroma-js` >=2.4.2
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
MIT
|