pH effects on absorption spectra: pKa determination by spectrophotometric method