cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
creatiiive
Microsoft
Microsoft

Greying out unselected images in gallery. Like transparency but for saturation.

I have a gallery that is populated with a list of items coming from an excel source. I have this in the Transparency property of the first item in the gallery(applicable to all items).

 

 

If(ThisItem.IsSelected, 0,0.4)

 

 

I get the exact thing I want but rather than the Transparency of those images being faded as they are not selected I would like to have the saturation of the colors to 0 (aka, grey scale icons). How would this be achievable ?

 

PS, my items are only displayed with a logo from the excel sheet(link), so no other info but an icon is to select from.

Thank you !

 

1 ACCEPTED SOLUTION

Accepted Solutions
NuttyPistons
Resolver IV
Resolver IV

I don't believe there's a way to change the saturation on an uploaded image. Another option would be to separately upload two images of each logo -- one in greyscale and one in full colour -- and then set 'Visible' on the Greyscale image to !ThisItem.IsSelected and set 'Visible' on the colour image to ThisItem.IsSelected.

View solution in original post

3 REPLIES 3
NuttyPistons
Resolver IV
Resolver IV

Hi @creatiiive ,

Instead of changing the image transparency -- what you can do is put a rectangle (from icons) in front of the image and then change the 'Fill' of that rectangle based on whether or not that item is selected. For example, you could use this code for the Rectangle Fill:

RGBA(0, 0, 0, If(ThisItem.IsSelected, 0, 0.75))

 

This is still changing transparency, but might achieve the effect that you're after.

Screenshot 2021-11-22 152424.png
This is the result, which is not a greyscale of icons. 
The image below is what i want to do.

Screenshot 2021-11-22 152648.png

NuttyPistons
Resolver IV
Resolver IV

I don't believe there's a way to change the saturation on an uploaded image. Another option would be to separately upload two images of each logo -- one in greyscale and one in full colour -- and then set 'Visible' on the Greyscale image to !ThisItem.IsSelected and set 'Visible' on the colour image to ThisItem.IsSelected.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,009)