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 Platform Community / Forums / Power Apps / Using String in RGBA f...
Power Apps
Answered

Using String in RGBA format as Color Value

(1) ShareShare
ReportReport
Posted on by 1,401 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,977 Moderator 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,401 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard