Modified grid contrast calculation