getAlphaFromOpacity static method
Returns an alpha value representative of the provided opacity
value.
The opacity
value may not be null.
Implementation
static int getAlphaFromOpacity(double opacity) =>
(opacity.clamp(0.0, 1.0) * 255).round();