a BooleanPredicate for conditional highlighting