How to change Text Color in table, but not Cell Color

hamza_123
hamza_123 Contributor

I want to change text color in a cell in a table based on a certain condition. But when I go to color option, it colors the whole cell and not just the text. 

 

Can anyone tell me how to do this?

Comments

  • Hi @Neeti,

     

    I tried using your piece of code. In my case, I am using a pivot tabl and not a table. Your code seems to color the background in a table, but we are interested in coloring the text only, not the background.

    Do you know what parameter it is?

     

    Moreover, did you try it for a pivot table or a regular table?

    Thanks!

     

     

  • Neeti
    Neeti Member

    HI,

     

    You can try color rules also, which will either change cell color or row color, based on your selection in color rule window. I have tried this on both pivot and normal table. Also, SUmo table will have more effective color rule implementation. Did you try sumo tables?

     

    Thanks,

    Neeti

  • Hi! I am using this to color a cell for a Mega Table:

     

    CONCAT('<div style="background-color:#69ff96; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">',CONCAT(`Month Data.ABSENTEEISM`, '%',' ', '(', CASE WHEN `Variance ABSENTEEISM` > 0 THEN '+' ELSE '' END , SUBSTRING(`Variance ABSENTEEISM`, 1, 5),'%', ')'), '</a></div>')

     

    The problem is that, no matter the number I change in the div, I always see a light blue value. 

    Basically I need to green and red colours :(, so I can paint the value based on a condition. 

     

  • AFAIK, Mega tables do not support HTML formatting.  HTML tables do, but they don't have all the functionality of Mega Tables (on the fly sorting or scrolling).

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
This discussion has been closed.