The present invention relates to compounds of general formula (I):wherein X is selected from the group consisting of O or S and R is a linear or branched, saturated or unsaturated aliphatic group with from 2 to 23 carbon atoms (C2 to C23), or a cyclic group, and which can contain substituents selected from the group consisting of hydroxy, alkoxy, amino, carboxyl, cyano, nitro, alkylsulfonyl or halogen atoms, a method of obtaining them, cosmetic or pharmaceutical compositions containing them and the use thereof for treating, caring for and/or cleaning skin, hair and/or nails, preferably those conditions, disorders or pathologies of the skin, hair and/or nails which require regulating melanogenesis.