Skip to main content

ink

Function ink 

Source
pub fn ink(alpha: f32) -> Hsla
Expand description

Translucent fill ink for interactive states and chip plates: soft-white on dark, soft-black on light at INK_FILL_SCALE of the alpha.

Alphas are quoted in dark-mode terms at every call site — the dark theme is the tuned one — and the light value is derived. Callers keep one number and both appearances stay in the relationship the dark tuning established.

Fills must never rest on transparent BLACK in dark mode: fully opaque washes killed the glass and flashed dark mid-fade (user reports), so hover fades rest on ink(0.0), which stays tonally correct at zero alpha.