def color.straight

gralha-svg-render@0.1.0.1 · svg.bend:4449

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
import gralha-image@0.1.0.1/image.bend as Img

4449def color.straight(c: Img.Color) -> Img.Color:
4450  Img.Color{r, g, b, a} = c
4451  +alpha = a
4452  Img.Color{(r / U.max(alpha, 0.0000001) : F32), (g / U.max(alpha, 0.0000001) : F32), (b / U.max(alpha, 0.0000001) : F32), alpha}

Uses (4)

Used by (2)