Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvllow/colorish
Normalize color hex values
https://github.com/mvllow/colorish
Last synced: 6 days ago
JSON representation
Normalize color hex values
- Host: GitHub
- URL: https://github.com/mvllow/colorish
- Owner: mvllow
- License: mit
- Created: 2021-06-17T18:27:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-10T16:59:13.000Z (about 3 years ago)
- Last Synced: 2024-11-17T12:45:47.487Z (2 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/colorish
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# colorish
> Objectify alpha hex values
## Usage
```js
import colorish from 'colorish'let colors = {
iris: '#c4a7e7',
gold: '#f6c177',
pine: '#31748f',
}let mutedColors = colorish(colors, 0.5)
// => { iris: '#c4a7e780', gold: '#f6c17780', pine: '#31748f80' }let rgbaColors = colorish(colors, 0.5, (color) => hexRgba(color))
// => { iris: 'rgba(196, 167, 231, 0.5)', gold: 'rgba(246, 193, 119, 0.5)', pine: 'rgba(49, 116, 143, 0.5)' }
```Learn more about what colorish can do [here](https://github.com/mvllow/colorish/blob/main/test/main.ts)
## Related
- [pinecone](https://github.com/mvllow/pinecone)