From NCERT Class 12 Chemistry; Sri Aurobindo Marg, New Delhi, India; January 2019; p. 136:
Colloidal solutions of basic dyes like methylene blue are positively charged whereas colloidal solutions of acid dye stuffs (eosin and Congo red) are negatively charged.
The charge on the sol particles is due to one or more reasons, due to preferential adsorption of common ions from solution and/or due to formulation of electrical double layer.
A base releases $\ce{OH-}$ ions, so it should preferably adsorb the same ions from water and become negatively charged. Why do basic dyes become positively charged then?
Similarly, acidic dyes release $\ce{H+}$ ions, so they should become positively charged, but that doesn't happen.