Ancestral circuits for vertebrate colour vision