backgroundCondition function

Generate a background condition for masking