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 / Color of Text based on...
Power Apps
Unanswered

Color of Text based on Input Data

(0) ShareShare
ReportReport
Posted on by 776

Hi All,

 

I would like that my text should display what color it has

Example - Red should reflect in red color, pink in pink 

 

I tried ColorValue(ThisItem.Color) but getting an error, new to powerapps - please help

PowerApp Color Text.png
Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    Can't view your screenshot, so not sure how your formula is setup.

    However, the ColorValue function expects one of a few inputs:

    • CSS color name
    • Hex 6 digit
    • Hex 8 digit

    Unfortunately, although there are enumerated colors in Power Apps, they won't resolve from a text input. Specifically, "White" as a text string is not the same as White (no quotes) in a formula bar. If your source has text color names, you can simply resolve the string/text using a lookup collection.

     

    ClearCollect(colColorReferences,{tblColorString: "White", tblColorEnumerated: White})

     

    Then you can try to find the color from your source.

     

    ColorValue(LookUp(colColorReferences, ThisItem.Color = tblColorString, tblColorEnumerated))

     

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

  • AshishJaiswal Profile Picture
    776 on at

    Apologies for late reply.

     

    Here is the screen capture.

     

    I tried what you have suggested but that didn't work

    Color Text.gif
  • AshishJaiswal Profile Picture
    776 on at

    Color Text.gif

     

    Image

  • AshishJaiswal Profile Picture
    776 on at

    @GarethPrisk Please advise

  • GarethPrisk Profile Picture
    2,828 on at

    You need to use the Fill or Color property, of the label.
    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/properties-color-border#normal

     

    In your screenshot, you're setting the Text of the label.

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
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard