here's another way to solve grid line coloring bug.
the idea is to set the grid line to black or white, as a function of contrasting to the agenda view non-working hours background color. I don't really like this as well since it doesn't consider the working hours background color.
Presumably the user picks a window text color that they can read against any working and non-working hour colors, which is why I think making a computation against any one background color (when we have several on display at the same time) is not a good idea.