determine cell color based on view limits