The pocilloporin Rtms5 and an engineered variant Rtms5H146S undergo distinct color transitions (from blue to red to yellow to colorless) in a pH-dependent manner. pK(a) values of 4.1 and 3.2 were determined for the blue (absorption lambda(max), 590 nm) to yellow (absorption lambda(max), approximately 453 nm) transitions of Rtms5 and Rtms5H146. The pK(a) for the blue-yellow transition of Rtms5H146S increased by 1.4 U in the presence of 0.1 M KI, whereas the pK(a) for the same transition of Rtms5 was relatively insensitive to added halides. To understand the structural basis for these observations, we have determined to 2.0 angstroms resolution the crystal structure of a yellow form of Rtms5H146S at pH 3.5 in the presence of iodide. Iodide was found occupying a pocket in the structure with a pH of 3.5, forming van der Waals contacts with the tyrosyl moiety of the chromophore. Elsewhere, it was determined that this pocket is occupied by a water molecule in the Rtms5H146S structure (pH 8.0) and by the side chain of histidine 146 in the wild-type Rtms5 structure. Collectively, our data provide an explanation for the observed linkage between color transitions for Rtms5H146S and binding to halides.