Package Exports
- chipsy
- chipsy/dist/chipsy.mjs
- chipsy/dist/chipsy.umd.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chipsy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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..
Installation
npm install chipsy
yarn add chipsy
bun install chipsy
pnpm install chipsyUsage
import { getColors } from 'chipsy';
const colors = getColors('tag-name','light',{level:0.5});
// return object { primary:"hsl(...)", secondary:"hsl(...)", tertiary:"hsl(...)" }Screenshots

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
- Generate pseudo random colors based on a name ( same name will always return same color )
- Configurable lightness level
- Supports dark and light themes (same color but different lightness level)
- Framework agnostic
- Lightweight and easy to use
More
License
Feedback / Suggestions / Contributions
Any feedback is greatly appreciated. If you have any suggestions or would like to contribute, please feel free to contact me.