The ATLAS Collaboration Charged-particle fragmentation functions for jets azimuthally balanced by a high-transversemomentum, prompt, isolated photon are measured in 25 pb −1 of pp and 0.49 nb −1 of Pb+Pb collision data at 5.02 TeV per nucleon pair recorded with the ATLAS detector at the Large Hadron Collider. The measurements are compared to predictions of Monte Carlo generators and to measurements of inclusively selected jets. In pp collisions, a different jet fragmentation function in photon-tagged events from that in inclusive jet events arises from the difference in fragmentation between light quarks and gluons. The ratios of the fragmentation functions in Pb+Pb events to that in pp events are used to explore the parton color-charge dependence of jet quenching in the hot medium. In relatively peripheral collisions, fragmentation functions exhibit a similar modification pattern for photon-tagged and inclusive jets. However, photontagged jets are observed to have larger modifications than inclusive jets in central Pb+Pb events.Ultrarelativistic nucleus-nucleus collisions create a quark-gluon plasma, a hot, dense, and long-lived system of deconfined quarks and gluons. The high density of unscreened color charges causes hard-scattered partons with large transverse momentum (p T ) to lose energy as they traverse the medium, a phenomenon referred to as jet quenching. In lead-lead (Pb+Pb) collisions at the Large Hadron Collider (LHC), jet production rates at fixed p T are suppressed relative to proton-proton (pp) collisions [1][2][3][4]. Since the parton shower develops inside the quark-gluon plasma, the momentum distributions of hadrons in the quenched jet are also modified. Measurements of the jet fragmentation function (FF) for inclusively produced jets in Pb+Pb collisions [5-7] exhibit differences from pp collisions. In these measurements, jets are selected by their final-state p T , i.e. after the effects of quenching, which may result in a bias towards jets that have suffered only modest modifications and complicates interpretation of the data [8, 9]. Alternatively, the initial parton p T can be tagged with a particle unaffected by the medium, such as a photon (γ) [10][11][12].The photon approximately balances the parton p T before quenching and thus selects populations of jets in pp and Pb+Pb collisions with identical initial conditions. A jet recoiling against a prompt photon is more likely to be initiated by the showering of a light quark, whereas inclusive jets are mostly initiated by gluons. Thus γ-tagged jets can provide information about how energy loss depends on the color charge of the initiating parton. Finally, the photon selection equally samples all geometric production points, whereas the inclusive selection may be biased towards jets which have lost less energy or were produced near the surface of the medium [13][14][15].Many theoretical models of jet quenching have highlighted the value of γ-tagged jet measurements [16][17][18], inviting systematic comparisons of these with inclusive jet measur...