Strict legislations in different countries have regulated the use of hair colorants and established the limits of dye concentration in cosmetics containing dyestuff. The present work describes a chromatographic HPLC-DAD method to determine the semi-permanent dyes basic blue 99 (BB99), acid violet 43 (AV43), basic brown 16 (BB16), basic red 76 (BR76) and basic yellow 57 (BY57) in hair coloring formulations. 1-butyl-3-methylimidazolium bis(trifluoromethanesulfonyl)imide, BMIm[NTf2], an ionic liquid (IL) at room temperature, helped to improve the separation and quantification of low levels of basic and acidic dyes by HPLC coupled to a diode array detector. The developed method successfully identified the dyes in a commercial semi-permanent hair dyeing formulation and in drinking water. Comparison with an LC-MS/MS technique aided the validation of the results.