alpha-changing-cover
alpha-changing-cover(self: none, alpha: 25%, fallback-hide: auto, fallback-hide-args: (:), it)(source)Cover content by fading every colour towards transparency.
Reads the colour actually in force and lowers its alpha, so covered content
keeps its own hues. That costs context calls; color-changing-cover is
the cheaper option if compile time matters, at the price of a flat look.
Note: this covers ordinary Typst content. Diagram packages such as cetz
paint outside it and are handled by fallback-hide.
Example: config-methods(cover: utils.alpha-changing-cover.with(alpha: 25%))
alpha : ratio default: 25%
The opacity to fade covered colours to. Default is 25%.
fallback-hide : func default: auto
Applied to what cannot be faded, such as images and
tiling fills. auto overlays them with semi-transparent-cover so they
match the surrounding fade. Pass none to leave them untouched.
fallback-hide-args : dict default: (:)
Extra named arguments for fallback-hide.
it : content
The content to cover.
Returns: content