v2.0.0
Major Changes
-
#94
a50183dThanks @tenphi! - Breaking: theformat*writers now takes/l/ton the 0–1 scale the Glaze converters return.formatOkhsl,formatOkhst,formatRgb,formatHsl, andformatOklchtook 0–100 percentages whileresolve(),variantToOkhsl,srgbToOkhsl,oklabToOkhsl, andokhslToSrgball return 0–1 — so composing a producer with a writer was off by 100x and failed silently, since0.7is 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/fromTonestill speak the 0–100 tone axis the authoring API takes — divide by 100 before handing a tone toformatOkhst.)Drop the
* 100at 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 ÷100round-trip only moves float noise (visible nowhere except the meaningless hue term of a fully-desaturatedhsl()string).