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/
npm install pastellify --save
yarn add pastellify ## or in yarn
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%)'
I've often found myself using generic profile picture icons for users and thought that was very boring.
Pastellify allows me to create deterministic and unique profile picture experiences for users based on their usernames. But you can use this for anything, really.
MIT