Sulfonphthaleine dyes are an important class of pH indicators, finding applications in novel (textile) sensors. In this paper, we present a combined experimental and theoretical study to elucidate the halochromic behaviour of a large set of sulfonphthaleine compounds. Starting from an experimental analysis consisting of UV/Vis spectroscopy, the pH region and the absorption wavelengths related to the colour shift are obtained and pKa values are derived. The effect of the substituents on the pH region can be traced back to their electron donating/withdrawing properties. Time-Dependent Density Functional Theory (TD-DFT) is able to adequately produce the trend in experimental wavelengths. Proton affinities are used to assess the effect of substituents on the pH region. The combination of theory and experiment is able to give a better understanding of the pH sensitivity; the methodology in this work will be useful in future dye design and is applicable to other dye classes as well.