Kokon
一款免费的本地化方案,可替代 Nano Banana 和 Generative Fill。涂抹区域,输入更改,由您自己的 GPU 进行编辑。提供 Windows、Mac 和 Linux 的单一安装程序。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Review any UI screenshot for accessibility and design quality. Colour contrast is measured against WCAG 2.2 in the browser, then an AI review (Claude) covers hierarchy, layout, consistency, copy and the issues rules can't catch, with a concrete fix for each.
Browser Server (Next.js route) Anthropic API
─────── ────────────────────── ─────────────
Upload → canvas → palette + pair ratings
Click / keyboard sampling
"Run AI review" ─ JPEG ≤1568px + context ─▶ /api/critique
+ failing pairs validate (Zod) → cache → rate limit
→ messages.parse (structured output) ─▶ Claude Haiku 5.5
Issues, filters, report ◀──────────────── typed JSON ◀──────────────────────────
The rule-based checks are free because they run in the browser. Only the AI review costs money: Claude Haiku 5.5 at $0.10 / $0.50 per million input / output tokens (Anthropic list price, October 2026), so one review of roughly 2,000 input and 1,000 output tokens is about $0.001. Repeat reviews of the same image come from an in-memory cache, and each visitor gets 5 reviews an hour with a 200-a-day cap overall. Hosting runs on Vercel's free tier.
npm install
cp .env.example .env.local # add your ANTHROPIC_API_KEY to enable AI review
npm run dev # http://localhost:3000
| Command | What it does |
|---|---|
npm test | Unit tests (Vitest): contrast maths, palette, API handler, report |
npm run e2e | Browser tests (Playwright) with axe accessibility scans; needs npm run build first |
npm run lint | ESLint |
npm run typecheck | Next.js route types + TypeScript |
npm run build | Production build |
CI runs all of these on every push and pull request.
Import the repo at vercel.com/new, then add ANTHROPIC_API_KEY under Settings → Environment Variables. Set a monthly spend limit in the Anthropic Console.
src/
app/page.tsx Page layout
app/api/critique/route.ts AI review endpoint (thin: wires dependencies)
components/ UI: workspace, sampler, findings, AI review, colour checker
lib/contrast/ WCAG luminance, ratios, large-text rules, hue-preserving fixes
lib/palette/ Palette extraction, pair rating, ink-colour sampling
lib/critique/ Request/response schemas, prompt, Claude call, handler, rate limit, cache
lib/report/ Markdown report builder
e2e/ Playwright tests and fixtures
Next.js 16, React 19, TypeScript, Tailwind CSS 4, Anthropic TypeScript SDK, Zod, Vitest, Playwright, axe-core, GitHub Actions, Vercel.