Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hunghg255/uncolur
Generate Shade Color
https://github.com/hunghg255/uncolur
color color-palette npm tailwind
Last synced: about 1 month ago
JSON representation
Generate Shade Color
- Host: GitHub
- URL: https://github.com/hunghg255/uncolur
- Owner: hunghg255
- License: mit
- Created: 2023-09-09T18:41:56.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-02T20:39:39.000Z (9 months ago)
- Last Synced: 2024-11-18T09:13:02.206Z (about 1 month ago)
- Topics: color, color-palette, npm, tailwind
- Language: TypeScript
- Homepage: https://uncolur.vercel.app
- Size: 52.7 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A library generate color palette from a colorInstall:
```bash
npm i uncolur
```Usage:
- bin
```js
npx uncolur@latest --color '#ABABAB'
```- module:
```js
// Tailwindcss
import { getColorsTailwindcss } from 'uncolur'const theme = getColorsTailwindcss('#ABABAB')
// Using rgb
const theme = getColorsTailwindcss('172,172,172')// Result
{
50: '#FBFBFB',
100: '#F7F7F7',
200: '#EAEAEA',
300: '#DDDDDD',
400: '#C4C4C4',
500: '#ABABAB',
600: '#9A9A9A',
700: '#676767',
800: '#4D4D4D',
900: '#333333',
950: '#333333',
}
``````js
// Ant Designimport { getColorsAntd } from 'uncolur'
const theme = getColorsAntd('#FF0000')
const themeDark = getColorsAntd('#FF0000', { dark: true })
// Result
[
'#fffbe6', '#fff3a3',
'#fff27a', '#fff352',
'#fff829', '#ffff00',
'#d2d900', '#a7b300',
'#7e8c00', '#586600'
]
```## Playground
[https://uncolur.vercel.app/](https://uncolur.vercel.app/)