cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Premwong13
Helper I
Helper I

Fill Color in the Label

Screen Shot 2562-07-01 at 12.52.08.png

 

This is my Excel table, table3. Each months have its own color.

I would like to fill in the Label in PowerApp.

Screen Shot 2562-07-01 at 12.44.39.png

My problem is I need to color the Label with the color that match to my indication, which I've indicated in Excel.

The name of color is in Title5. And When I indicade the blank label with 

Label5

It'll show "Purple". 

But when I combine it with 

Color.Lebel5  

or

Color.Lebel5.Text

 

Not thung happen, but error.

Could you guys guide me how todeal with this?

Thanks

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
SimonPiquer
Continued Contributor
Continued Contributor

Hi!


You could either set the color value to either:

 

ColorValue(ThisItem.Color)

or

 

ColorValue(Label5.Text)

Please give that a shot!

 

View solution in original post

SimonPiquer
Continued Contributor
Continued Contributor

Try this instead in that case:

 

ColorValue(Concat(Filter(Split(Label5.Text,""),IsMatch(Result, "^[a-zA-Z]")),Result))


It should make sure no special characters are taken from the label, only A-Z.

View solution in original post

6 REPLIES 6
SimonPiquer
Continued Contributor
Continued Contributor

Hi!


You could either set the color value to either:

 

ColorValue(ThisItem.Color)

or

 

ColorValue(Label5.Text)

Please give that a shot!

 

Thank you so much,Simon!

ColorValue(Label5.Text)

It works! 


@SimonPiquer wrote:

Hi!


You could either set the color value to either:

 

ColorValue(ThisItem.Color)

or

 

ColorValue(Label5.Text)

Please give that a shot!

 

Another Problem, like Light Blue. 

When it's in a code, it's invalid due to a space bar.

How could I solve that? 

SimonPiquer
Continued Contributor
Continued Contributor

Try this instead in that case:

 

ColorValue(Concat(Filter(Split(Label5.Text,""),IsMatch(Result, "^[a-zA-Z]")),Result))


It should make sure no special characters are taken from the label, only A-Z.

Thank you so much! 

Neither of these worked for me. Do you have any other suggestions?

 

I turned around and answered my own question. You have to use the Hex Color and not the RGBA

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,887)