We have developed a surface model of purple membrane and applied it in an analysis of the purple-to-blue color change of bacteriorhodopsin which is induced by acidification or deionization. The model is based on dissociation and double layer theory and the known membrane structure. We calculated surface pH, ion concentrations, charge density, and potential as a function of bulk pH and concentration of mono- and divalent cations. At low salt concentrations, the surface pH is significantly lower than the bulk pH and it becomes independent of bulk pH in the deionized membrane suspension. Using an experimental acid titration curve for neutral, lipid-depleted membrane, we converted surface pH into absorption values. The calculated bacteriohodopsin color changes for acidification of purple, and titrations of deionized blue membrane with cations or base agree well with experimental results. No chemical binding is required to reproduce the experimental curves. Surface charge and potential changes in acid, base and cation titrations are calculated and their relation to the color change is discussed. Consistent with structural data, 10 primary phosphate and two basic surface groups per bacteriorhodopsin are sufficient to obtain good agreement between all calculated and experimental curves. The results provide a theoretical basis for our earlier conclusion that the purple-to-blue transition must be attributed to surface phenomena and not to cation binding at specific sites in the protein.