chipsy

1.1.7 • Public • Published

Chipsy

Chipsy is a simple, lightweight, and easy to use framework agnostic library that allows you to create beautiful multi-purpose pseudo random colors that can be used for chips, tags and more..

MIT License Build Status NPM Downloads NPM Version NPM Bundle Size

Installation

npm install chipsy
yarn add chipsy
bun install chipsy
pnpm install chipsy

Usage

import { getColors } from 'chipsy';
const colors = getColors('tag-name','light',{level:0.5});
// return object { primary:"hsl(...)", secondary:"hsl(...)", tertiary:"hsl(...)" }

Screenshots

Screenshot

API Reference

Get color

  getColors(name, theme, options)
Parameter Type Description
name string Required. Label name
theme string 'light' or 'dark'
options object
options.level number 0.0 to 1.0

Features

  • [x] Generate pseudo random colors based on a name ( same name will always return same color )
  • [x] Configurable lightness level
  • [x] Supports dark and light themes (same color but different lightness level)
  • [x] Framework agnostic
  • [x] Lightweight and easy to use

More

License

MIT

Feedback / Suggestions / Contributions

Any feedback is greatly appreciated. If you have any suggestions or would like to contribute, please feel free to contact me.

Package Sidebar

Install

npm i chipsy

Weekly Downloads

4

Version

1.1.7

License

MIT

Unpacked Size

10.7 kB

Total Files

5

Last publish

Collaborators

  • lokesh-coder