cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate V
Advocate V

Using ColorValue() with RGBA()

Hi,

I have a text string like this

"rgba( 215,50,19,1)"

 

and I want to use it as fill color for a value.
--> Error Message: "Expected color value".

So I tried this function:

"ColorValue("rgba( 215,50,19,1)").

No Error message, but Color is black and not red.

 

Can any body help?


5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Using ColorValue() with RGBA()

Are you picking the colors from variable or how exactly did you apply in the app.

You can try

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Community Support
Community Support

Re: Using ColorValue() with RGBA()

Hi @max81 ,

Do you want to fill a color for a value based on the Text string "RGBA(215,50,19,1)"?

 

Based on the formula that you mentioned, I found that there is something wrong with it. The ColorValue() function is only accept CSS Color name (e.g. "RoxyBrown"), or 6-digit hex value or 8-digit hex value as its argument. You could not specify the "RGBA(215,50,19,1)" within the ColorValue function.

Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-colors

 

If you want to use ColorValue within your canvas app, you should use the following formula:

ColorValue("#D73213")      // RGBA(215,50,19,1)

 

More details about supported CSS Color Name and 6-digit hex value, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-colors#built-in-colo...

 

If the RGBA() Text String is from your data source, please consider store the CSS Color Name or 6-digit hex value or 8-digit hex value in your data source instead of the "RGBA(215,50,19,1)", then you reference it within the ColorValue() function.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate V
Advocate V

Re: Using ColorValue() with RGBA()

Hi @v-xida-msft,

hi @eka24 

 

thanks for your answers.

 

I got the "rgba(..)" string from Connector "PowerAppsforMakers" or "PowerAppsforAdmins" out of the "properties.backgroundColor" and I want to show in my app the correct App Icon.

 

I also have read the function reference, but I'm confused, because I saw that this function works in the "Center of Excellence" for example in the app "Set New App Owner". (see screenshot).

 

 

Highlighted
Community Support
Community Support

Re: Using ColorValue() with RGBA()

Hi @max81 ,

Thanks for your feedback. Yeah, I see it. Currently, within single canvas app, you could not use the RGBA(..) Text value within the ColorValue.

 

I guess that within the "Set New App Owner" template app of the "Center of Excellence", the ThisItem.properties.backgroundColor formula has been changed into supported color string in a CSS in underlying, although, theThisItem.properties.backgroundColor formula returns a text value.

 

I would post this issue to my Product Team, if there are any updates on this issue, I would reply here.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate V
Advocate V

Re: Using ColorValue() with RGBA()

@v-xida-msft :
Please see the new attached screenshot.
I've just added a new label to see the returned string for ThisItem.properties.backgroundColor. It's just the rgba(...) string.

 

The Items propertie for the gallery is:

Filter(PowerAppsforAdmins.GetAdminApps(galEnvironments.Selected.name,{'$top':1100}).value, txtSearchText.Text in properties.displayName || txtSearchText.Text in properties.owner.displayName)

 

Thanks for your support 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,170)