Basic dyes contain amino groups (-NH2) or substituted amino groups that can accept a proton to become positively charged cations in solution. The -NMe2 (dimethylamino) group is characteristic of basic dyes like malachite green, crystal violet, and methylene blue, which carry a positive charge and bind to negatively charged substrates. Hydroxyl (-OH) and nitro (-NO2) groups are found in acid and mordant dyes, while -SO3Na (sulfonate) creates water-soluble acid dyes.