First of all, melanines are mixtures of complex polymers, without highly ordered structures and precisely defined composition. It means that unlike e.g. polypropylene or PET, melanines are not composed of regularly repeating identical units (monomers).
In a great simplification, brown and black eumelanines are composed of units of DHI (5,6‐dihydroxy‐1H‐indole) and DHICA (5,6‐dihydroxy‐1H‐indole‐3‐carboxylic acid). The order of these units is random and the ratio of DHI to DHICA depends on the origin of the pigment. Darker eumelanines are enriched in DHICA, which form branched structures (each DHICA unit can be bonded to three other units). Light-brown eumelanines contain more DHI units. Pheomelanines are build of different units - alanylhydroxybenzothiazines.
Now to the color. The color of melanines results from the absorption of light by electrons of chromophores (i.e. fragments of a molecule that strongly absorb light at certain wavelengths). In eumelanines the chromophores are dihydroxyindole units, and in pheomelanines benzothiazine rings. The color of melanines does not result directly from how are these bonded with each other, but from how many chromophores are in a melanine molecule, how densely are they packed, and from a number of different factors (e.g. presence of metal ions, oxydation). Black eumelanines absorb more light than brown eumelanines, because they have more chromophores (they are more densly packed due to the branching of the polymer) and that is why they appear darker. And pheomelanines have different chromophores that absorb light of a bit different wavelength (blue region). Different bonding patterns affect the optical density of melanines, but not directly their color.