Repository navigation
v2.0.0
⚠️ Breaking changes
1. Contrast scores changed — @pawn002/okca ^1.0.1 → ^2.0.2
okca 2.0 recalibrated its constants (CHROMA_K, POL_K, LOD_CAP, DOL_CAP), so the same colors score differently than they did under klar 1.x:
| v1.0.1 | v2.0.0 | |
|---|---|---|
| light-on-dark cap | 21 | 20.9 |
| dark-on-light cap | 20 | 20 |
white on #767676 |
~3.5 | ~3.9 |
A pair that cleared a threshold under 1.0.1 may not under 2.0.0, and vice versa. If you have design tokens validated against klar 1.x output, re-run them before upgrading. The FP=0 guarantee now holds by construction rather than by sampling — see FP0_PROOF.md.
2. klar pair --min-lightness / --max-lightness removed
These flags parsed but never constrained the output — passing them was already a no-op. They now exit 2 as unknown options instead of being silently ignored. Remove them from any scripts.
3. Usage errors exit 2, not 1
commander's parse errors (unknown option, unknown command, missing argument) previously exited 1 — the same code klar uses for soft failure, making klar find --targt 4.5 indistinguishable from "no color meets the target" to a script branching on $?. Usage errors now exit 2, matching the documented contract. --help and --version still exit 0.
Package versions
@pawn002/klar-plugin-interface and @pawn002/klar-plugin-registry are unchanged and stay at 1.0.1. The plugin API did not break — only klar-cli goes to 2.0.0.
What's Changed
Full Changelog: v1.0.1...v2.0.0