Parameters
The grayscale amount. 0 means no grayscale, 1 means fully grayscale. Defaults to 1 if not specified.
Applies a grayscale effect to this view.
.grayscale(amount?: number): Component;
Image("colorful.jpg")
.grayscale()
Rectangle()
.fill(Color("rainbow"))
.grayscale(0.5)
Image("photo.jpg")
.grayscale(0)