Two dark visions of American high school life will collide when the kids from “Riverdale,” CW’s teen drama based on the characters of Archie Comics, come together for a production of “Carrie: The Musical.”

The special episode, which airs Wednesday, continues the tradition of television shows dipping into the world of musical theater.

The show’s executive producer, Roberto Aguirre-Sacasa, said he and the rest of the “Riverdale” team knew they wanted to make a musical episode since the show was first conceived. But they knew it had to reflect the themes and tone of the series.

“Because ‘Riverdale’ is a bit darker and is a little bit off-kilter and subversive, when we talked about doing a musical episode we talked about doing a darker, more genre musical,” he said.