A federal appeals court upheld a law on Monday that would force tobacco companies to put prominent, graphic warnings on packs of cigarettes, but it also ruled that the companies should be able to use colorful advertising themselves.

The 6th Circuit Court of Appeals in Cincinnati also upheld a law that lets the Food and Drug Administration ban marketing that might appeal to children and teens, such as sponsorship of events, free samples, and branded hats and t-shirts.

“We affirm the decision of the district court upholding the Family Smoking Prevention and Tobacco Control Act’s restrictions on the marketing of modified-risk tobacco products; bans on event sponsorship, branding nontobacco merchandise, and free sampling; and the requirement that tobacco manufacturers reserve significant packaging space for textual health warnings,” U.S. Circuit Judges Eric Clay, Jane Branstetter Stranch, and Michael Barrett wrote.

The court also ruled that FDA can make cigarette companies feature big, graphic warnings on packs, with Clay, who wrote the ruling, also dissenting from that piece.

“Where I part with the majority is on what I consider to be a constitutional flaw in the requirement for color graphic warning labels,” Clay wrote, calling the requirement unprecedented and designed to create a visceral reaction rather than to inform.

“Although the government has demonstrated that an information deficit still exists among potential tobacco consumers, which may render warning-less tobacco products inherently deceptive, it has not adequately shown that the inclusion of color graphic warning labels is a properly or reasonably tailored response to address that harm,” Clay wrote.

Last month, U.S. District Judge Richard Leon sided with tobacco companies who sued FDA, saying the agency had no right to require new, graphic pictures on cigarette packages.

Advocates say they hope a Washington appeals court will take the Cincinnati ruling into consideration next month when the Obama administration argues its appeal of Leon’s decision. “We hope it influences their decision and the D.C. Circuit overturns Leon's decision,” said Mary Rouvelas, senior counsel for the American Cancer Society Cancer Action Network.

Four of the five largest tobacco companies filed suit in August against the law requiring the labels and imposing other restrictions, saying the requirements violate their right to free speech.