Can I color the same Composable(Card) in multiple ...
# compose
a
Can I color the same Composable(Card) in multiple colors, if I have three colors then I want to color the card by these three colors equality, any idea?
e
Use a gradient
Copy code
Brush,horizontalGradient(
  0.0f to cyan,
  0.5f to cyan,
  0.5f to lightBrown,
  1.0f to lightBrown,
  ...
)
You would do some calculation for
n
number of sections but the idea remains the same. Using a gradient, spread the color stops based on
n
a
Using gradient is an elegant idea that didn't come to my brain so sure I'll try it and come back, Thanks!