diff --git a/.changeset/plain-scales-align.md b/.changeset/plain-scales-align.md deleted file mode 100644 index a42e6a6..0000000 --- a/.changeset/plain-scales-align.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@tenphi/glaze': major ---- - -**Breaking:** the `format*` writers now take `s` / `l` / `t` on the 0–1 scale the Glaze converters return. - -`formatOkhsl`, `formatOkhst`, `formatRgb`, `formatHsl`, and `formatOklch` took 0–100 percentages while `resolve()`, `variantToOkhsl`, `srgbToOkhsl`, `oklabToOkhsl`, and `okhslToSrgb` all return 0–1 — so composing a producer with a writer was off by 100x and failed silently, since `0.7` is a legal percentage and the result was a valid CSS string naming a near-black color. The library now speaks one scale end to end. (`toTone` / `fromTone` still speak the 0–100 tone axis the authoring API takes — divide by 100 before handing a tone to `formatOkhst`.) - -Drop the `* 100` at the call site (`formatOkhst(v.h, v.s, v.t)`); a leftover one now warns instead of shifting the color quietly. Every export method — `css()`, `tokens()`, `tasty()`, `json()`, `dtcg()`, `tailwind()`, `glaze.format()` — emits the same colors as before: they were compensating internally, and dropping the redundant `×100 ÷100` round-trip only moves float noise (visible nowhere except the meaningless hue term of a fully-desaturated `hsl()` string). diff --git a/CHANGELOG.md b/CHANGELOG.md index 80f0794..a928026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # @tenphi/glaze +## 2.0.0 + +### Major Changes + +- [#94](https://github.com/tenphi/glaze/pull/94) [`a50183d`](https://github.com/tenphi/glaze/commit/a50183d418de732daefc2004ad67e41014257189) Thanks [@tenphi](https://github.com/tenphi)! - **Breaking:** the `format*` writers now take `s` / `l` / `t` on the 0–1 scale the Glaze converters return. + + `formatOkhsl`, `formatOkhst`, `formatRgb`, `formatHsl`, and `formatOklch` took 0–100 percentages while `resolve()`, `variantToOkhsl`, `srgbToOkhsl`, `oklabToOkhsl`, and `okhslToSrgb` all return 0–1 — so composing a producer with a writer was off by 100x and failed silently, since `0.7` is a legal percentage and the result was a valid CSS string naming a near-black color. The library now speaks one scale end to end. (`toTone` / `fromTone` still speak the 0–100 tone axis the authoring API takes — divide by 100 before handing a tone to `formatOkhst`.) + + Drop the `* 100` at the call site (`formatOkhst(v.h, v.s, v.t)`); a leftover one now warns instead of shifting the color quietly. Every export method — `css()`, `tokens()`, `tasty()`, `json()`, `dtcg()`, `tailwind()`, `glaze.format()` — emits the same colors as before: they were compensating internally, and dropping the redundant `×100 ÷100` round-trip only moves float noise (visible nowhere except the meaningless hue term of a fully-desaturated `hsl()` string). + ## 1.5.0 ### Minor Changes diff --git a/package.json b/package.json index 7e1c5af..196fabf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tenphi/glaze", - "version": "1.5.0", + "version": "2.0.0", "description": "OKHST-based color theme generator with WCAG contrast solving for light, dark, and high-contrast schemes", "type": "module", "main": "./dist/index.cjs",