GithubHelp home page GithubHelp logo

lokesh-coder / chipsy Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 471 KB

Home Page: https://lokesh-coder.github.io/chipsy/

License: MIT License

JavaScript 2.24% TypeScript 74.82% CSS 0.84% Shell 0.19% Astro 21.91%

chipsy's Introduction

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

  • 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

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.

chipsy's People

Contributors

lokesh-coder avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.