Shubham Singh
12/22/2024, 8:55 AMlinear-gradient
that is made up of a color
and another linear-gradient
.
Basically, the child linear-gradient
is lightened by mixing a pinch of white
with it.Meet
12/22/2024, 9:34 AMShubham Singh
12/22/2024, 9:36 AMDavid Herman
12/22/2024, 11:00 PMbackground
property (https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient).
Here's an example of me using it in my blog site: https://github.com/bitspittle/bitspittle.dev/blob/c4b48f08a4c014da80911562979bea4a[…]tspittle/site/components/widgets/blog/koverbadge/GradientBar.ktShubham Singh
12/23/2024, 5:11 AMDavid Herman
12/23/2024, 5:12 AMShubham Singh
12/23/2024, 5:20 AMDavid Herman
12/23/2024, 5:21 AMShubham Singh
12/23/2024, 5:21 AMDavid Herman
12/23/2024, 5:26 AMShubham Singh
12/23/2024, 5:27 AMDavid Herman
12/23/2024, 5:47 AMDavid Herman
12/23/2024, 5:48 AMBox {
val size = 200.px
Box(
Modifier
.size(size)
.backgroundImage(
linearGradient(LinearGradient.Direction.ToRight, Colors.Blue, Colors.Red)
)
)
Box(
Modifier
.size(size)
.backgroundColor(Colors.White.copyf(alpha = 0.4f))
)
}
David Herman
12/23/2024, 5:49 AMDiv
would have also been fine)David Herman
12/23/2024, 5:51 AMBox(Modifier
.size(200.px)
.background(
Colors.Green,
Background.of(
image = BackgroundImage.of(linearGradient(LinearGradient.Direction.ToRight, Colors.Blue, Colors.Red)),
blend = MixBlendMode.Lighten
),
)
)
but I wasn't able to get something that did what you were asking (lightening the pink gradient with a splash of white)Shubham Singh
12/23/2024, 5:56 AMDavid Herman
12/23/2024, 6:02 AM