The molecular structure of melanin, one of the most ubiquitous natural pigments in living organisms, is not known and its multifaceted biological role is still debated. We examine structural models for eumelanin protomolecules, based on tetramers consisting of four monomer units (hydroquinone, indolequinone, and its two tautomers), in arrangements that contain an interior porphyrin ring. These models reproduce convincingly many aspects of eumelanin's experimentally observed behavior. In particular, we present a plausible synthetic pathway of the tetramers and their further complexation through interlayer stacking, or through formation of helical superstructures, into eumelanin macromolecules. The unsaturated nature of C-C bonds in indolequinone units and the finite size of protomolecules introduce covalent bond formation between stacked layers. We employ time-dependent density functional theory to calculate the optical absorption spectrum of each molecule along the eumelanin synthesis pathway, which gradually develops into the characteristic broad-band adsorption of melanin pigment due to electron delocalization. These optical spectra may serve as signatures for identifying intermediate structures.