withAlpha
Creates a new Color that has the same red, green, and blue components as this Color, but with the specified alpha value.
const translucentRed = Color.RED.withAlpha(0.9);
Content copied to clipboard
Return
The modified result parameter or a new Color instance if one was not provided.
Parameters
alpha
The new alpha component.
result
The object onto which to store the result.