0.1.2 • Published 2 months ago

pastellify v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Pastellify

npm npm version npm downloads sponsors

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