Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Feb 28, 2024
1 parent 170d0e1 commit 8877142
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ Import the colors:
```js
import colors from '@master/colors'
```
The structure of the `colors` object in v1 uses hex color codes without the `#` prefix as values, and the color scale is `2~98`:
Each color in v1 contains `2~98` shades.
```js
{
red {
2: '0b0000',
4: '150000',
2: '#0b0000',
4: '#150000',
...,
98: 'fffcfc',
'': 'd11a1e'
98: '#fffcfc',
'': '#d11a1e'
},
gray: {
...
},
...
}
```
The exported `fillColorScale(colors)` helps you fill `2~98` with custom colors:
The exported `fillColorScale(colors)` helps you fill `2~98` shades with custom colors:
```js
import fillColorScale from '@master/colors/fill-color-scale'

const customColors = fillColorScale({
10: 'ff3366',
20: 'ff4488',
10: '#ff3366',
20: '#ff4488',
...
90: 'ff3311'
90: '#ff3311'
})
```

Expand Down

0 comments on commit 8877142

Please sign in to comment.