Agouti - sekelsta/horse-colors Wiki
Agouti is a coat color gene affecting the location of black pigment in horses.
Bay and recessive black
There are two known alleles of agouti, called "A" and "a". A is the normal (wild type) color which produces bay, and a produces black. A is dominant over a, following the usual convention that the dominant gene is uppercase and the recessive gene is lowercase.
Here are the possible genotypes:
AA or Aa: If the horse can produce black pigment (i.e. not chestnut / not ee at extension), the black pigment will be restricted to the mane, tail, and lower legs so the horse will be bay.
aa: If both alleles are a, the horse cannot restrict the black pigment and will be solid black.
Other hypothetical variants
Seal brown describes horses which appear nearly black but have some red pigment visible in the "soft areas", the flanks, around the muzzle, and around the eye. Some believe that seal brown is caused by a variant of agouti called at.
Wild bay describes horses which are like bay but have very little black pigment on the legs, usually only around the fetlock. Some think wild bay is also caused by a variant of agouti called A+.
Genetic testing of a wild bay or seal brown horse will show A. This does not necessarily mean that they really have the same agouti allele as bay horses, only that if there is a difference we don't yet know what it is. Testing can recognize a, and then anything else is assumed to be A.