79211023

Date: 2024-11-21 11:58:24
Score: 1
Natty:
Report link

A simple solution in compose, can be controlled by a float value (from 0f to 1.0f)

inline fun Color.darken(darkenBy: Float = 0.3f): Color {
   return Color(
        red = red * darkenBy,
        green = green * darkenBy,
        blue = blue * darkenBy,
        alpha = alpha
        )
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Andrew Dobosh