Create two conditional format expressions one for each color. Specify the desired fill color that you want when that specfic expression is true.
So maybe your field, LayoutTableOccurrence::Color should cause the tab panel to be Red when the text "red" is entered into the color field. If so, use this expression:
LayoutTableOccurrence::Color = "red"
and specify a red fill color.
Then you could create a second conditional format with this expression:
LayoutTableOccurrence::Color = "blue"
And specify a blue color for the tab panel's fill color.
The thing is that I need to convert text in my two text fields to a boolean value so conditional formating understand that there is a value in my two text fields. How?
You do not need to do any such thing.
My examples did not do any such conversion. They just compared the contents of the text field to text in quotes. I used "Red" and "blue" as my quoted text simply as an example. I could have set the conditional formats to change the color for any text that works for what I am trying to do with that text field.