def color.premul.clamp
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
import gralha-image@0.1.0.1/image.bend as Img
4459def color.premul.clamp(c: Img.Color) -> Img.Color:
4460 Img.Color{r, g, b, a} = c
4461 +alpha = U.clamp(a, 0.0, 1.0)
4462 Img.Color{U.clamp(r, 0.0, alpha), U.clamp(g, 0.0, alpha), U.clamp(b, 0.0, alpha), alpha}