Kinetic investigation into pH-dependent color of anthocyanin and its sensing performance