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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using String in RGBA f...
Power Apps
Unanswered

Using String in RGBA format as Color Value

(1) ShareShare
ReportReport
Posted on by 1,387 Moderator

I have a Collection of color values in "RGBA(####,####,####,#.#)" format. When I use this as a color value:

LookUp('App Style Guide',Name = "App Bar Fill").RGBA

 

which outputs:

RGBA(0,0,0,1)

 

But when I use that as the color value for something I get "Expected Color Value". My workaround is to put the "RGBA" text on the outside and then pull in the values for the numbers individually:

RGBA(
 LookUp('App Style Guide',Name = "App Bar Fill").R,
 LookUp('App Style Guide',Name = "App Bar Fill").G,
 LookUp('App Style Guide',Name = "App Bar Fill").B,
 LookUp('App Style Guide',Name = "App Bar Fill").A
)

 

Categories:
I have the same question (0)
  • Verified answer
    MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at

    Why you store as hexadecimal value and using ColorValue("#FFFFF") to set the color?

     

    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as solution ✔️. This is help the community.

  • IPC_ahaas Profile Picture
    1,387 Moderator on at
    Unfortunately converting or storing the values as HEX seems to be the only solution. My resulting code looks like this:
     
     
    ColorValue(LookUp('App Style Guide', Name = "App Bar Fill").'Color HEX')
  • Suggested answer
    CarlosFigueira Profile Picture
    on at
    If you have the color in the RGBA(<number>, <number>, <number>, <number>) format, you can use an expression like the one below to extract the components and create the color:
    With(
        Match(
            LookUp('App Style Guide',Name = "App Bar Fill").RGBA,
            "RGBA\(\s*(?<r>\d+)\s*,\s*(?<g>\d+)\s*,\s*(?<b>\d+)\s*,\s*(?<a>[\d\.]+)\s*\)"),
        RGBA(Value(r),Value(g),Value(b),Value(a))
    )
    If you already have the components in your 'App Style Guide' table, you can use a With call to make the expression a little simpler:
    With(
      { fillColor: LookUp('App Style Guide',Name = "App Bar Fill") },
      RGBA(fillColor.R, fillColor.G, fillColor.B, fillColor.A)
    )
    Hope this helps!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard