v1.2.0
Minor Changes
-
#82
7002c2dThanks @tenphi! - Preserve contrast fortone: 'max'/'min'on colors with abase. The
extreme is no longer re-mapped through the dark tone window (which compressed
the base-to-extreme span and lowered contrast in dark). Glaze now measures the
tone shift the light scheme applied between the base and the extreme and
replays it against the base's resolved dark tone — mirrored under
mode: 'auto', same-signed under'fixed'. The result is clamped to
[0, 100]only, so it may cross thedarkToneboundary, and pins at the
extreme when the shift does not fit. Root extremes (nobase),mode: 'static',
high-contrast variants, and standaloneglaze.color()tokens are unchanged. -
#84
5809f18Thanks @tenphi! - AdddarkHue/darkSaturationso a palette can seed a different hue and
saturation for the dark schemes instead of relying on the flat
darkDesaturationhaircut.Set them on the theme seed for a whole-palette shift, or on a single color to
retune just that token:const theme = glaze({ hue: 280, saturation: 80, darkHue: 268, // dark schemes seed from 268 darkSaturation: 65, // and from 65 rather than 80 }); theme.colors({ accent: { tone: 55, hue: '+20', darkHue: '+35' }, warning: { tone: 60, saturation: 0.9, darkSaturation: 0.6 }, });
Both apply to the
darkanddarkContrastvariants, and both fall back to
their light counterparts, so existing themes resolve exactly as before. Seed
values use the same units ashue/saturation(0–360 and 0–100); a color
def'sdarkSaturationis a 0–1 factor like itssaturation. Relative
darkHue: '+N'anchors to the theme's dark seed hue. Authoring any dark
saturation bypassesdarkDesaturationrather than stacking with it, and
mode: 'static'ignores both. Shadows and mixes need no new fields — they
derive their channels from the colors they reference.glaze.color()gains the same controls asdarkHue,darkSaturation(0–100
seed) anddarkSaturationFactor(0–1), all round-tripping through
export()/glaze.colorFrom().splitHueexports stay correct: when a dark hue is authored, the hue custom
properties are re-declared in the dark block and under the Tasty dark state.