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
Super User
Super User

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
Super User
Super User

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
Super User
Super User

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,167)