“I feel like I’m doing something illegal, and I like it,” Danielle Macdonald said.
It was a shivery Monday morning, and Ms. Macdonald shook a spray can and hissed an arc of orange paint.
After starring in the recent Netflix movies “Dumplin’” and “Bird Box,” Ms. Macdonald, 27, was receiving a master class in graffiti writing from an artist who calls herself Anjl. The classroom was a semi-vacant lot in the Bushwick section of Brooklyn, ringed by a chain-link fence and barbed wire. Even though the class broke no laws, it still felt just a little criminal.
For Ms. Macdonald, learning to write graffiti is a yearslong dream (she once tried to find every Banksy in London). Knowing the dream was a messy one, she had dressed down, wearing a black puffer jacket, bright bluejeans and old sneakers.
Her hair, the color of raw honey, twirled in the wind. She was kitted out in plastic gloves and a plastic apron, which gave her the look of an extremely chilly food service worker. This was not the apocalyptic world of “Bird Box”; no blindfold required.
As a length of canvas was zip-tied to the fence, Anjl, in a short green coat, a tall beanie and paint-stained gloves, asked Ms. Macdonald about possible tags. In “Patti Cake$,” her breakout 2017 movie about a Jersey girl who dreams of rap stardom, Ms. Macdonald’s Patti had a fistful of handles: Patti Cakes$, White Trish, Jane Doe, Killa P.
Anjl asked if she had a nickname of her own. “Yeah,” Ms. Macdonald said with hesitance, “but it’s not very cool.”
“In graffiti it could be cool,” Anjl said.
“What is it?”
“I love it.”
Ms. Macdonald decided to drop the “a.” Her tag: DNDi.
Anjl unpacked cans from a duffel bag and fitted them with yellow banana caps. She explained that holding the can next to canvas would make a thin line and spraying from a couple of inches away, the distance of a clenched fist, would make a wider one.
She demonstrated her own tag, full of curlicues, arrows and a halo, then turned the canvas over to Ms. Macdonald, who approached it warily, holding a can of emerald green. “I don’t really know what I should be doing,” she said.
“Do whatever you want,” Anjl said.
Ms. Macdonald hasn’t landed her film roles by hanging back. As a gifted actress in an industry with blinkered ideas of how leading ladies should look, she credits her success, in part, to being “just, like, really stubborn” and believing that you “have to own who you are,” she said.
Her arm outstretched, she sprayed her tag, the letters ascending like painted up-talk. “I don’t know what that is,” she said, sounding uncertain. In person, she is a lot less outspoken than her onscreen characters, perhaps from being on damp, unfamiliar turf.
“It’s your tag!” Anjl said.
“It’s just creativity,” Anjl said.
Ms. Macdonald was more confident as she wrote it again in purple. And braver still when she tried two colors: sandy yellow bubbles filled with khaki green.
Graffiti was hard, but not nearly as hard as learning to rap for “Patti Cake$.” In “Dumplin’,” in which she plays an outspoken teenager who mutinies against the beauty pageant culture her mother (played by Jennifer Aniston) loves, she had to sing backup for Dolly Parton. That was hard, too. So was playing a pregnant wife in the middle of an apocalypse in “Bird Box,” the meme-generating horror movie starring Sandra Bullock.
“Every scene where I had more than, like, three lines, I’m basically crying,” Ms. Macdonald said.
For a big finish, Ms. Macdonald would collaborate with Anjl on their “masterpiece”: a word that they would color in and then ornament with shadows and highlights. Anjl suggested “Brooklyn” or “New York City,” but as Ms. Macdonald noted, those involved a lot of letters. They settled on “NYC” instead.
Anjl outlined the three-foot-tall letters, and Ms. Macdonald filled them in with darkening shades of orange and red. “A sunset-type situation,” Ms. Macdonald said.
As an actress, Ms. Macdonald is as meticulous as she is fearless. Graffiti, with its fast pace and occasional drips and relative lack of control, was a big adjustment. “I’m scared to go outside the lines,” she said. But she sprayed on.
Once Anjl added the shadows in black and the highlights in white, the piece was complete. Teacher and student stood back to admire their work, drips and all.
“I’m a perfectionist so this is hard for me,” Ms. Macdonald said. “The cool thing about it is it’s almost better when it’s not perfect. But it’s still hard for me.”
“That can be the hardest part about being an artist,” Anjl said. “I never feel like it’s totally finished.”
Ms. Macdonald stripped off her apron and gloves and struck some tough girl poses next to her teacher.
“I feel cooler than I actually am. And cold,” said Ms. MacDonald, who grew up in Sydney. She planned to go in search of a latte while the canvas dried.
Anjl encouraged her to keep tagging when she returned to Los Angeles, where she lives with a dog and a cat. Ms. Macdonald didn’t volunteer if she lived with anyone else, though she did say that dating in Hollywood is “super-weird.”
Ms. Macdonald agreed that graffiti would be harmless fun. “It’s like the safe thing to do,” she said. “It’s better than a D.U.I.”