bis -- methylpyridinium compounds useful as a ph indicator or for the detection of ammonia having the formula : ## str1 ## wherein one of r 1 and r 2 is a bis -- methyl radical and the other is a lower alkyl radical ; r 2 can also be hydrogen atom or trifluoromethyl ; r 3 and r 4 are hydrogen or , together with the carbon atoms to which they are attached , represent a benzene ring ; and x . sup .⊖ is an appropriate acid anion or said compounds are betaines .