Adding colors in a code?

Dear all,

is it possible to add color in the code of a configurate column? Is there function for that?

Like using a "ifexpr" and have the true in green and the false in red?

 

Actually i use html tags before my formula but like it changes all the formula, i double it with an empty condition
Ex: 

  VALUE(ifexpr(object.type()  = "LEG", "yes", "")) VALUE(ifexpr(object.type()  = "LEG", "", "No"))

The problem is that with this technic i have 2 values in the result and so "sort" and "filter" doesn't work well... 
I would like to have something like

ifexpr(object.type()  = "LEG", "yes".color::green, "no".color::red)    (I put anything just for the comprehension)

 

Thank you