This technology is a method for synthesizing iridium oxide-gold hybrid nanowires used to generate electrochromic devices. The nanowires are assembled via bacteriophage scaffolding. First, a phage display library is used to select for phage with an affinity for iridium oxide. Gold nanoparticles are chemically linked to this selected virus, which binds iridium oxide. Applying a high-voltage pulse results in the formation of hybrid iridium oxide-gold nanowires. The nanowires exhibit both anodic and cathodic polarization and range in color from a bleached state to blue/black. The unique structure of the virus-based nanowires provides them with enhanced functionality that includes improved color retention and rapid charging and response times. Fabrication of the nanowires is performed rapidly in solution at room temperature and does not require further processing.