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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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 Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (3,410)