Last Updated: February 22, 2026
The Taichi Theme Generator API provides programmatic access to balanced color theme generation. All endpoints are self-contained serverless functions optimized for Vercel's free tier with robust rate limiting.
Every request to /api/generate-theme returns both Light and Dark themes
simultaneously, ensuring visual parity for modern UI development.
- Saturation (-5 to 5): Control vibrancy from muted to vivid.
- Contrast (-5 to 5): Control separation/flatness across tokens.
- Brightness (-5 to 5): Global lightness shift.
- Split Controls: Optional independent
light*/dark*levels. - Dark First: Optional dark-first generation with companion parity.
- Base palettes are generated at neutral levels.
- Brightness, contrast, and saturation are then applied together in one coherent adjustment stage.
- A parity pass aligns chromatic token identity between light/dark modes.
- Text readability is enforced on
bg,card, andcard2after all adjustments. - Guardrails also ensure token separation (e.g., border vs bg/card, text vs textMuted).
9 color harmony styles supported:
monochrome,analogous,complementary,split-complementary,triadic,tetradic,compound,triadic-split,random
- Generates balanced Light and Dark themes using color harmony theory.
- Returns 20 semantic tokens per theme (40 total token values per response).
- Includes metadata with philosophical context.
- Converts any theme object into developer formats.
- Supports: CSS, SCSS, LESS, Tailwind, and JSON.
api/
├── generate-theme.ts # API handler for theme generation
├── export-theme.ts # Multi-format exporter
└── README.md # Local dev guide
curl -X POST https://taichi.bucaastudio.com/api/generate-theme \
-H "Content-Type: application/json" \
-d '{"style":"analogous","baseColor":"#3B82F6","saturationLevel":2,"contrastLevel":1,"brightnessLevel":-1}'- OKLCH Export: Support
oklch()CSS values for P3 wide gamut displays. - AI Integration: Allow LLMs to refine generated themes via API.
Status: ✅ Live and Functional