web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

RGBA Color LookUp

(0) ShareShare
ReportReport
Posted on by 3,976

Pie Charts have an ItemcColorSet which lets you specify a list of colors for each additional slice. Other items do not.

 

For instance, I have a Gallery with many rectangles that I want to color based on other content. I have a solution, but I am interested in a more elegant solution. Below is the formula I am currently using, but my criteria is much more complicated, so things are not as pretty.

 

RGBA(
LookUp(colorcode, ThisItem.data = criteria, Num),
LookUp(colorcode, ThisItem.data = criteria, Num),
LookUp(colorcode, ThisItem.data = criteria, Num),
LookUp(colorcode, ThisItem.data = criteria, Num))

Each LookUp corresponds to a different color. The first one is the Number for Red, the next is Green, and so on. All of the information is in a table colorcode.

 

 

Is there a way to pull up all four of those numbers in one lookup instead of four? Finding other solutions to this would help with creating universal styles more easily.

Categories:
  • Brian Dang Profile Picture
    3,976 on at

    I've been using the Table() function more often lately. It has been very useful for creating controls that understand arguments for navigation. For instance, a Dropdown menu could use the following formula in its Items property:

    Table(
    {Num: 1, Screen: Login},
    {Num: 2, Screen: Home})

    Note that there are not quotation marks around Login and Home. That is because the Table function can understand those objects instead of text.

     

    Then you could set Dropdown.OnChange to:

     

    Navigate(ThisItem.Screen,Fade)

    It works like a charm for navigation.

     

    I think the same mechanism could be very useful for setting up color charts. Allowing the Table function to handle colors would be an easy way to make color lookup more efficient. For instance:

     

    Table(
    {Num: 1, Colour: RGBA(#,#,#,#)},
    {Num: 2, Colour: RGBA(#,#,#,#)},
    {Num: 3, Colour: RGBA(#,#,#,#)},
    {Num: 4, Colour: RGBA(#,#,#,#)})

    Then objects in that gallery could adopt the color using:

     

    ThisItem.Colour

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard