pastellify
v0.1.4
Published
Deterministically turn any string into a soft pastel color. 🟣
Downloads
907
Maintainers
Readme
Pastellify
Deterministically turn any string into a soft pastel color. 🟣
- 🪶 Extremely lightweight: Source code is only 4 lines long.
- ⚡ Blazingly fast: Does not rely on any other package. Just gets the job done.
Try it out here: https://diragb.github.io/pastellify/
Installation
npm install pastellify --save
yarn add pastellify ## or in yarn
Usage
import pastellify from 'pastellify'
pastellify('Hello!') // [330, 78, 73]
pastellify('Hello!', { saturation: 68, lightness: 65 }) // [330, 68, 65]
pastellify('Hello!', { toCSS: true }) // 'hsl(330, 78%, 73%)'
Inspiration
I've often found myself using generic profile picture icons for users and thought that was very boring.
License
MIT