Use .withAlpha() with a value between 0 and 255 to represent the alpha channel directly.
.withAlpha()
eg: Color(0xff171433).withOpacity(0.1) -> Color(0xff171433).withAlpha((0.1 * 255).toInt())
Color(0xff171433).withOpacity(0.1)
Color(0xff171433).withAlpha((0.1 * 255).toInt())