Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A movie producer warned Mila Kunis' career would end if she refused to pose half-naked for a men's magazine, the A-list actress wrote in an open letter about sexism in Hollywood and society at large.

"You'll never work in this town again," the unidentified producer allegedly told the star of "Black Swan," "Ted," and "Friends With Benefits" after Kunis said she would not take off her clothes to promote a film.

Mila Kunis poses at a film premiere at the Mann Village Theatre on July 26, 2016, in Los Angeles. Chris Pizzello / Invision via AP

"What this producer may never realize is that he spoke aloud the exact fear every woman feels when confronted with gender bias in the workplace," Kunis wrote in the letter that ran Wednesday on A Plus, a website co-founded by her husband, Ashton Kutcher.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"And guess what? The world didn't end," Kunis added. "The film made a lot of money and I did work in this town again, and again, and again."

The letter details what Kunis said was pervasive bias against women not only in Hollywood but throughout society.

Related: Kunis Reveals She and Kutcher Made Frugal Choice for Wedding Rings

The letter cites a study showing the "pay gap is closing at such a slow rate that it will be 136 years before women are paid equally to men. 136 years. And the pay gap is but one clear quantification of the acute undervaluing of the contributions of women in the workplace."

She highlighted how after years of being "insulted, sidelined, paid less, creatively ignored, and otherwise diminished based on my gender" she decided to start her own production company with three other women.

But even then, Kunis said she received offensive and sexist comments from industry insiders.

"I'm done with compromising" and "I'm done with being compromised," she added.

The actress acknowledged that if she's been treated this way, "it is happening more aggressively to women everywhere."