theme-colors
轻松生成主题颜色深浅
轻松生成主题颜色深浅
用法
安装包
# npm
npm install theme-colors
# yarn
yarn add theme-colors
# pnpm
pnpm install theme-colors
# bun
bun install theme-colors
导入
// 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");
这将生成以下色调
{
50: '#FBFBFB',
100: '#F7F7F7',
200: '#EAEAEA',
300: '#DDDDDD',
400: '#C4C4C4',
500: '#ABABAB',
600: '#9A9A9A',
700: '#676767',
800: '#4D4D4D',
900: '#333333',
950: '#222222',
}
开发
许可
灵感来源于 javisperez/tailwindcolorshades
用心制作 💛
根据 MIT 许可证 发布。