Based on @Rasoul Miri answer you can create extensions to your main color class in a more kotlinic way. For example, if using the color class from the package androidx.compose.ui.graphics.Color
in Android you can add some extensions to it in this way:
fun Color.lighter(factor: Float = 1f) =
Color(ColorUtils.blendARGB(this.toArgb(), Color.White.toArgb(), factor))
fun Color.darker(factor: Float = 1f) =
Color(ColorUtils.blendARGB(this.toArgb(), Color.Black.toArgb(), factor))
This is a very handful function that can be used by simply doing
val myNewLighterColor = MaterialTheme.colors.primary.lighter(0.5f)
val myNextDarkerColor = MaterialTheme.colors.primary.darker(0.5f)