javisperez/tailwindcolorshades
关于
TailwindCSS 色阶生成器 - https://javisperez.github.io/tailwindcolorshades
网站与应用开发可以做什么
- Multiple Color Formats: Generate colors in OKLCH, RGB, or HEX formats
- Tailwind v3 & v4 Support: Compatible with both Tailwind CSS versions
- Color Generation: Automatically generates 11 shades (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950)
- Customizable Names: Auto-generate color names or provide your own
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Color Shades Generator for Tailwind CSS
A modern tool for generating color palettes for your Tailwind CSS projects. Built with Vue 3, TypeScript, and Vite.
Live Demo
Visit https://javisperez.github.io/tailwindcolorshades to try it out.
What is this?
This tool helps you create custom color palettes for Tailwind CSS by generating shades and tints from a base color. It supports both Tailwind CSS v3 and v4 configurations, with support for OKLCH and HEX format.
The goal is to simplify the process of creating custom color scales that maintain consistent visual harmony and proper contrast across all shade levels.
Features
- Multiple Color Formats: Generate colors in OKLCH, RGB, or HEX formats
- Tailwind v3 & v4 Support: Compatible with both Tailwind CSS versions
- Color Generation: Automatically generates 11 shades (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950)
- Customizable Names: Auto-generate color names or provide your own
- Export Options: Copy generated configurations directly to your clipboard
- Import Existing Configs: Load and modify your existing Tailwind color configurations
- URL Sharing: Share your palettes via URL parameters
- Selective Export: Choose which shade levels to include in your config
- WCAG Contrast Badges: Every shade shows its AA / AAA rating for the better of white or black text, with both ratios on hover
- Live UI Preview: See your palette on real components (nav, form, alert, chart) in light and dark mode, with contrast checks
- Type Any Color: Paste hex,
rgb(),hsl(),oklch()or a color name, or use the visual picker - Light & Dark Theme: The whole UI follows your system preference and takes on the color of your palette
How to Use
- Pick a base color using the color picker or adding the code in the color picker input
- The tool automatically generates 11 shades from light (50) to dark (950)
- Customize palette names or toggle which shades to include
- Copy the generated configuration (top button) and paste it into your Tailwind config file
Development
Prerequisites
- Node.js 22+
- pnpm
Project Setup
pnpm install
Development Server
Start the development server with hot-reload:
pnpm dev
Build for Production
Type-check, compile and minify:
pnpm build
Testing (TODO)
Run unit tests with Vitest:
pnpm test:unit
Linting
Lint and fix code:
pnpm lint
Contributing
Contributions are welcome! Feel free to fork this repository and submit pull requests for:
- Bug fixes
- New features
- Documentation improvements
- Performance enhancements
License
This project is open source and available under the MIT License.
探索相关项目
加载中…