My grasp of genetics is hazy in general but as I understand it:
Human hair color is determined by two pigments, eumelanin (brown) and pheomelanin (red). The eumelanin, "brown" allele is dominant (meaning that if it is present it "overrides" the contrasting allele, basically "not-brown") and the pheomelanin allele is recessive (is overridden by the "not-red" allele). More pigmentation leads to darker hair colors, less pigmentation leads to lighter or blonde hair.
Normally black hair is due to a high presence of eumelanin, but it's likely that if you take a good amount of brown pigment and add on top of that a red pigment you'll end up with a hair color dark enough to be rendered as black by the artists' intentionally limited palette. Mary had
very red hair, and Warren had brown hair with a noticeably red tint, suggesting that he had some red in him which wouldn't override Mary's. In other words, Terry and Matt could have easily inherited high levels of both pigments, ending up with a combined hair color that was very dark/black.
...
Or, you know, they could just be part of the Super-Batman Project.