Contourf with a zebra-like colormap?

Is there a way to create a colormap for a filled-contour plot such that the fill color alternates between two colors? For example, in the image below, between the 1 and 2 level it would be gray, between the 2 and 3 level it would be white, and then between the 3 and 4 level it would be gray again, etc…

It seems like it hiccups and doesn’t always pull the right value from the color map?

    using ColorScheme, Colors, Plots
    levels=0:1:40

 # This makes a ColorScheme that alternates between gray and white
    grays = ColorScheme([RGB{Float64}(.5 + mod(i,2)/2,.5 + mod(i,2)/2,.5 + mod(i,2)/2) for i in levels]) 

    contourf(x, y, (x,y) ->  x./y' / 2000 * 60;
        contour_labels = true,
        levels,
        color=cgrad(grays,41,categorical=true)
    )

The 60/2000 factor is just a scaling for my problem. I only include it because the image below was generated with that scaling factor.

It’s more to provide easy reading of what level line you’re in, not to encode value into the color.

simplebad