Here, when this dye add to water it will peak up H+ from water and become neutral and the corresponding cation (Na+) and OH- from water form NaOH. So the nature of the solution become basic ie. pH of the solution become greater than 7.
📷
Dye name: Methylene blue
Here, similar thing when this dye add to water it will peak up OH- from water and become neutral and the corresponding anion (Cl-) and H+ from water form HCl. So the nature of the solution become acidic ie. pH of the solution become lesser than 7.