We study underlying-event observables in inelastic proton-proton (pp) collisions at a centre-of-mass energy of $$\sqrt{s} = 13$$
s
=
13
TeV with identified light and heavy-flavor triggers using the PYTHIA 8 event generator. The study is performed as a function of the transverse momentum of the leading particle ($$p_\mathrm {T}^\mathrm{trigger}$$
p
T
trigger
). While at high $$p_\mathrm {T}^\mathrm{trigger}$$
p
T
trigger
($$>10$$
>
10
GeV/c) the underlying-event activity is independent of the leading particle species, at intermediate $$p_\mathrm {T}^\mathrm{trigger}$$
p
T
trigger
($$2<p_\mathrm {T}^\mathrm{trigger} <8$$
2
<
p
T
trigger
<
8
GeV/c) it is larger in pion-triggered events than in events triggered with B mesons. Moreover, the underlying event in pion-triggered events, the majority of which are initiated by gluons, shows a stronger effect of color reconnection than events triggered with B-hadrons, that are mostly initiated by quark jets. The effect is observed at both hadronic and partonic level. Given that color reconnection affects the interaction among final partons before the hadronization, and that in the string model quarks (gluons) are connected to one (two) string piece(s), we conclude that the observed effect can be attributed to differences in the interactions of gluon and quark jets with the underlying event.