The invention relates to a method for dyeing human keratin fibres, comprising the application of a composition containing, in a cosmetically suitable medium, a vegetable extract including at least one compound having formula (I) and/or formula (II) or the addition salts thereof, combined with an external heat, light and/or chemical stimulus produced using one or more organic and/or inorganic salts, in which formulae: R1 represents a hydrogen, a methyl, a hydroxymethyl, -CH2-glucose, an aldehyde group, -CO2R4 with R4 representing hydrogen or an alkyl radical at C1-C2; R2 represents a hydrogen, hydroxyl, glucose; R3, identical or non-identical, represent a hydrogen, hydroxyl, alkyl(C1-C4)oxy, the hydroxyl number not exceeding 2; n is an integer between 1 and 5; R5 represents -CO2R'6 with R'6 representing a hydrogen, alkyl at C1-C2, an alkaline metal cation, an ammonium group; and R6 represents a hydrogen, -CO2R'6 with R'6 representing a hydrogen, an alkyl at C1-C2, an alkaline metal cation, an ammonium group. The invention also relates to a composition comprising, in a cosmetically acceptable medium, one or more compounds having the aforementioned formula (II), as well as to the use of such compounds for the dyeing of human keratin fibres.