See more of the story

When Anthony Anderson honors his old friend Prince, he goes all in. The 100th episode of Anderson’s hit sitcom, “Black-ish,” airing Tuesday on ABC, is dedicated to the late legend, from faithful re-creations of classic videos to clever digs about how the Purple One managed to survive Minnesota winters.

Speaking by phone Friday, Anderson reflected on his friendship with Prince and his show’s milestone.

Q: You guys have tackled a lot of serious issues over the show’s five seasons, but I’m not sure I’ve ever seen the cast have this much fun. What was it like channeling Prince in those music videos?

A: It was tough. Our director Charles Stone was a stickler for getting it down shot for shot, just like the videos. But we were able to live out our fantasies in those sequences. We all had a great time. Unfortunately, I wasn’t on the set when Marsai Martin did “When Doves Cry,” but I saw the footage the next day and was blown away. I was saying, “I wish I had been around for that performance,” forgetting that she’s a 14-year-old girl lip syncing to a song. It just seemed so real to me.

Q: You personally appear in re-enactments of “Kiss” and “Erotic City.” Was there any trepidation over putting yourself out there?

A: I used to sit back and think that only he could pull off the costumes he wore in those videos and on those album covers. But then you come full circle and say, “You know what? I’m comfortable in my own skin.” But me in that black halter top!

A few years ago, Tracee [Ellis Ross] and I co-hosted the BET Awards shortly after he passed and there were tributes throughout the night. At one point, I came out in ass-less pants to pay homage. It’s all about immersing yourself in the joke and being bold. That’s what we all did for this episode.

Q: The episode has the characters looking back at how Prince’s music affected their lives. Were you doing the same?

A: Nothing resonates more than the work of great musical artists. Their music gets you through the difficult times and the best of times. I remember as a kid sneaking out to listen to the “Dirty Mind” album and how much “Adore” meant to me when I was 15 and thought I was in love with a girl. His music is the soundtrack to my life.

When I was growing up, there was always the debate: Are you a Michael Jackson fan or a Prince fan? How can you choose? People ask me how I can root for both the Lakers and the Clippers. Well, I’m a fan of the sport. I felt the same way about Michael and Prince. To become an adult and live around the corner from the Jackson compound and then go on and befriend Prince is just surreal.

Q: Is there a moment in your personal relationship that sticks out?

A: I was living in New York, shooting “Law & Order,” when Prince was playing Madison Square Garden. After the show, we went to a place called the Village Underground. Prince whispered something into his assistant’s ear and then the assistant leaned over to me and said, “Prince wants you to come to his hotel for pizza and pasta.” Then Prince got up and left.

It was 2 a.m. My wife and I took a cab to the Ritz-Carlton and were given access to a special floor and suite. He was out back holding court and I was in the front of the room telling jokes. Prince always wanted to know what was going on, so he came over and pretended to be picking out some music. I made some kind of joke and he chuckled and walked off. That made my night. I was one of the few people who had his personal phone number. I don’t know how I was so lucky.

Q: You’re not the only cast member with a personal tie. Yara Shahidi spent part of her childhood at Paisley Park. Did you two bond over your connection?

A: Yara was quite young then. I’ve talked more about him with her father [Afshin Shahidi], who was Prince’s photographer. We attended the memorial together at Paisley Park. That was the only time I’ve been there. I had always thought about it as this mystical place and now I had finally made it. But the circumstances made it bittersweet.

Q: Was it important that this tribute is the show’s 100th episode?

A: I know the show’s writers wanted to do something special. I don’t know if it was because of my relationship with him or not. It may have just been a coincidence.

Whatever the reason, I was just happy to be a part of it.