withAlpha

fun withAlpha(color: Int, alpha: Int): Int(source)

Returns the specified color with an added alpha channel. That means a transparent/opaque color.

alpha ranges from 0 (completely transparent) to 255 (completely visible). Values outside this range are coerced into it.