how can i change the opacity of Text Color.White in JetPack Compose
Text(text = funfact , fontSize = 18.sp, color = Color.White )
You can change the alpha channel from the Color attribute:
Text(text = funfact, fontSize = 18.sp, color = Color.White.copy(alpha = 0.5f))
You can also use the alpha modifier:
Text(
text = funfact,
modifier = Modifier.alpha(0.5f),
fontSize = 18.sp,
color = Color.White,
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With