Socket
Socket
Sign inDemoInstall

theme-colors

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    theme-colors

Easily generate color shades for themes


Version published
Weekly downloads
2.1K
increased by17.11%
Maintainers
1
Install size
10.4 kB
Created
Weekly downloads
 

Changelog

Source

v0.1.0

compare changes

🚀 Enhancements

  • Add 950 shade (#19)

🏡 Chore

  • Use correct org for coverage badge (#17)
  • Update renovate config (#15)
  • Update repository (#30)

🤖 CI

  • Add autofix action (#29)

❤️ Contributors

Readme

Source

theme-colors

npm version npm downloads bundle Codecov

Easily generate color shades for themes

Usage

Install package:

# npm
npm install theme-colors

# yarn
yarn add theme-colors

# pnpm
pnpm install theme-colors

# bun
bun install theme-colors

Import:

// ESM
import { getColors } from "theme-colors";

// CommonJS
const { getColors } = require("theme-colors");

const theme = getColors("#ABABAB");
// Or using RGB
const theme = getColors("172,172,172");

This will generate the following shades:

{
  50: '#FBFBFB',
  100: '#F7F7F7',
  200: '#EAEAEA',
  300: '#DDDDDD',
  400: '#C4C4C4',
  500: '#ABABAB',
  600: '#9A9A9A',
  700: '#676767',
  800: '#4D4D4D',
  900: '#333333',
  950: '#222222',
}

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Inspired by javisperez/tailwindcolorshades

Made with 💛

Published under MIT License.

Keywords

FAQs

Last updated on 28 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc