Under a cloud of the tragic shooting in Colorado, Warner Bros.’ “The Dark Knight Rises” scored $30.6 million from approximately 3,700 midnight locations, positioning the film solidly for the three days.

Imax contributed $2.3 million of the pic’s total late-night gross.

The Batman finale outgrossed its predecessor, which earned $18.4 million from midnights. The pic also got off to a stronger late-night start than “The Avengers,” at $18.7 million.

With the pic’s positive gross outlook comes the sobering news early this morning of 12 moviegoers shot and killed at a midnight screening of “TDKR” in Aurora, Colo. One man has been arrested.

Warners still won’t be celebrating a record opening for “TDKR” based solely on midnight grosses.

If midnights told the whole story, “Harry Potter and the Deathly Hallows: Part 2” — the reigning late-night champ, with $43.5 million — easily would still be the biggest three-day domestic opening, at $169 million, not “The Avengers.”

As it happens, “TDKR” skews primarily toward adult auds, who typically avoid midnight crowds. That’s comparable to “The Dark Knight,” which grossed $158 million during its debut sesh. Meanwhile, the three-quel’s weekend heights, pegged so far at around $175 million, will depend greatly on adult and some family playability.

“Dark Knight Rises” continued to play during some early morning showtimes; pic launched wide today at 4,404 locations.