color with its alpha replaced.
- color: the colour to start from.
- alpha: the new alpha, 0 to 1.
solid := rgb(10, 20, 30);
assert(with_alpha(solid, 0.25).w == 0.25);with_alpha :: (color: Color, alpha: float) -> Color
color with its alpha replaced.
Parameters
- color: Color
- the colour to start from.
- alpha: float
- the new alpha, 0 to 1.
Returns
solid := rgb(10, 20, 30);
assert(with_alpha(solid, 0.25).w == 0.25);