pastellify
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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.


"i am not vibing with this icon" ~me all the time fr

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.

License

MIT

/pastellify/

    Package Sidebar

    Install

    npm i pastellify

    Weekly Downloads

    366

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    3.74 kB

    Total Files

    3

    Last publish

    Collaborators

    • diragb