I have just be brought to task by a web designer friend for using an in-house colour pallet that creates text and background with insufficient contrast.
He proceeded to demonstrate this using an on-line contrast checker - by which every text box in my beautiful Experience Builder app failed the WCAG test.
https://webaim.org/resources/contrastchecker/
My suggestion is for every widget interface that includes an option for Text Format and Background Fill should automatically calculate a contrast ratio and display a WCAG AA/AAA 'pass' or 'fail.'
Just for information - not to be a prohibition of certain combinations.