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

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? 

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,127)