You want something like:
"If yourformula then crWhite" in the font's X-2 box
and
"If yourformula then crBlack" in the background's X-2 box (and a tick in the background check box)
For both of these, set the dropdown colour choice to the default value you want, e.g. black for font, white for background.
Anything font wise tends to have an alias of cr????? where ????? is the value you want. e.g. crBlack, crWhite, crBold.