Dynamically compute whether a grid is dark or not, and correctly set action bar colors in cases where the primary color is dark and the secondary color is light, and vice versa.