There are several ways.
Do a really good job of degreasing the metal.
Try applying a coat of cold blue or Birchwood-Casey Brass Black.
Strangely, cold blue will often give brass a gray color if left on for 10 to 15 minutes.
The Brass Black will turn the brass a darker gray color.
For a REALLY black color, buy some Liver of Sulfur from an art supply house. It's used to blacken copper plates.
Antique supply houses and model train shops also sell a brass blackening chemical.
After the brass is a nice dark color, use 0000 steel wool to lightly remove "most" of the blackening from the larger, open areas, leaving the recessed and protected areas dark.
You want the brass that's not dark to have a flat, non-shiny yellow color, not a shiny golden color, so go easy with the steel wool.