Global replacement of tryptophan with aminotryptophans generates non-invasive protein-based optical pH sensors.