To match and color a pattern.