The present invention provides a compound having an excellent inhibitory action on melanin production and being useful as a whitening agent, and a skin external preparation containing the compound. The whitening agent of the present invention comprises, as an active ingredient, a heterocyclic compound represented by formula (1) or a pharmacologically acceptable salt thereof: wherein A is C 1-6 alkyl, C 5-6 cycloalkyl, benzyl, benzylcarbonyl, benzoyl, phenyl, pyridyl or pyrimidyl; Ra is H, C 1-6 alkyl, or C 2-6 alkenyl; " - - - " represents a single bond or a double bond whereinn = 1 or 2; Y is S or O; and R 3 and R 4 are each independently H, C 1-6 alkyl, hydroxy-C 1-6 alkyl, C 2-7 acyl, phenyl, pyridyl, pyrimidyl, etc.;with the proviso that at least one R 3 is a group other than C 1-3 alkyl in the case where: the hetero ring containing Y is a thiazoline ring; R 4 = Ra = H; X 1 = X 2 = CH; and either p = 0 or R 5 = C 1-6 alkyl.