First off — thank you for taking the time to contribute. 🎉
This project exists to make accessible color tooling free for everyone, and every contribution — from a typo fix to a new color-space export — moves that mission forward.
By participating you agree to uphold our Code of Conduct. Please be kind, inclusive, and assume good intent.
- 🐛 Report bugs via the bug report issue template.
- 💡 Suggest features via the feature request template.
- 📖 Improve docs — clearer wording and examples are always welcome.
- 🧪 Add exporters — a new target format (e.g. iOS
.swift, Compose) is a great first PR. - 🌐 Translate the README into another language.
- ⭐ Star & share the repo so others can find it.
You'll need Bun (or Node 18+) installed.
# 1. Fork & clone
git clone https://github.com/<your-username>/chroma-flow.git
cd chroma-flow
# 2. Run the example to confirm everything works
bun run example
# 3. Try the CLI
bun run cli "#6366f1"There are no dependencies to install — the library is zero-dependency by design, and the dev tooling uses Bun directly.
chroma-flow/
├── src/ # Library source (zero dependencies)
│ ├── srgb.ts # hex <-> RGB <-> linear RGB
│ ├── oklch.ts # OKLCH color space
│ ├── wcag.ts # WCAG 2.1 contrast
│ ├── colorblind.ts # CVD simulation
│ ├── generator.ts # palette generation
│ ├── suggest.ts # text color suggestion
│ ├── exporters.ts # CSS / Tailwind / JSON / SCSS / SVG / XML
│ └── types.ts
├── cli/ # CLI entry point
├── examples/ # Runnable examples
└── docs/ # Extended docs
- Keep it dependency-free. New runtime dependencies will not be accepted unless there is a compelling, well-justified reason. Dev dependencies are fine.
- TypeScript strict mode must stay happy — no
any, no unused vars. - Document public API. Every exported function needs a JSDoc comment.
- Add an example if you add a new feature.
- Keep diffs focused. One feature/fix per PR makes review faster.
We don't ship a test framework in the repo yet (see roadmap). For now, exercise
your change by updating examples/basic.ts or adding a small script under
examples/ and running it with bun run.
We follow Conventional Commits:
feat: add iOS Swift exporter
fix: clamp negative chroma in generator
docs: clarify OKLCH ramp in README
chore: bump version
- Create a branch:
feat/ios-exporter,fix/contrast-rounding, etc. - Make your changes, keep commits focused.
- Open a PR against
mainand fill in the template. - Respond to review feedback — we're friendly, promise. 🙌
Maintainers handle releases. Versions follow SemVer and are recorded in CHANGELOG.md.
Open a discussion or jump into an issue — happy to help you find your first contribution.