Update calendar.php

take into account blue component of background colour for computation of foreground colour
Merge pull request #909 from volkerpeters/patch-1

Update calendar.php