Recent high-profile casting decisions, including the Scarlett Johansson role in the remake of the Japanese anime film “Ghost in the Shell” and Tilda Swinton’s casting as a sorcerer of Tibetan descent in Marvel’s “Dr. Strange,” also served as inspiration. But Mr. Yu said the final push came when he read a recent study by researchers at the Ralph J. Bunche Center for African American Studies at the University of California, Los Angeles that suggested movies with more diverse casts made more money.

“That was kind of the linchpin of me thinking, ‘If that’s true, then why aren’t we seeing leads reflecting this fact?’ ” he said. “If they’re not casting these leads, let’s show what Hollywood would look like if they did.”

Mr. Yu said he didn’t grow up with many Asian role models in movies or on TV, and he didn’t have many mainstream actors to choose from when creating the project. As he Photoshopped Mr. Cho into the role of Captain America, he caught himself chuckling at the possibility that an Asian man could fill the role.

“It shouldn’t be crazy for someone to take that role,” he said.

Mr. Cho, 43, hasn’t addressed the project — save for sending a heart emoji to the @StarringJohnCho Twitter account. But he spoke publicly about how racism had affected his professional life in a session with Reddit users last year.

“I experienced racism, and in my professional life, I try to take roles (and have always tried to take roles) that don’t fall within the parameters of any Asian stereotype,” he wrote.