LEO uniforms

It just occurred to me that the uniforms sheriff’s deputies wear tend to be green or khaki or brown (usually with one of those as a contrasting colour), and the ones police and highway patrol wear tend to be blue or black. Of course this is not always true (e.g., CHP wear khaki); it’s just what I’ve noticed IRL in California, Washington, and in images from around the country. I’m talking about what I perceive as a general trend.

  1. While the majority of uniforms I’ve seen follow the perceived trend, is it true? What percentage of uniforms follow the pattern of blue = police and green/brown = County?

  2. If the pattern is true, is there a formal agreement between agencies? Or is it just that one LEO department in an area chose one colour, and the other one chose another so as not to avoid confusion?