Is it possible to have multiple colors on a string based on conditions?

For example, I have a row where column1 has the value dog.cat, and column2 has the value cat.

I want to change the color of the text of column1 to gray, but the part of the string that matches what's in column2 want it red. So dog. would remain gray, but cat would be highlighted red.

It this possible to do so?

If you want to highlight the background of the column or the actual text you can use a ternary operator though as part of the string may make it more complicated and probably have to use a split function... can you share more details of the columns themselves and the data in them?

Not out of the box, I don't think so - I'm guessing your use case might be to highlight matches in a search?
Might be possible with a markdown column and emphasised text, maybe use some custom css to change the background of what you wrap the text in. Not straightforward though something like this maybe a starting point - but this looks horribly inefficient and messy to me:

1 Like

Thanks! Using markdown actually allows for a similar solution, but it does achieve what I want from it