MacFarlane has promised to match up to $1 million in pledges made on the Kickstarter website so that an online version of “Reading Rainbow” can be made available without charge to an expanded number of underfunded classrooms, Burton said in a statement Thursday.

MacFarlane’s offer is in effect through 3 p.m. EDT on July 2, when the online fundraiser is to conclude.

Burton said he was left nearly speechless by the “extraordinary generosity” of his friend, the TV and movie writer-producer-actor whose credits include “Ted” and “Family Guy.” MacFarlane’s spokeswoman confirmed the offer.

More than $4 million had been pledged by 83,000-plus contributors as of Thursday afternoon.

Burton, star of “Roots and “Star Trek: Next Generation,” was host of the children’s literacy program that aired on public television through 2009. “Reading Rainbow” was launched as a best-selling tablet app in 2012, and aims to expand its reach with a subscription-based home version that will start at $5 monthly.

An educator-specific format will be created for schools and made available free to 1,500 of the neediest classrooms with the first $1 million in donations, according to RRKidz, the for-profit company co-founded by Burton.

The additional donations, including from MacFarlane, will enable the format to be extended to at least another 6,000 such classrooms, according to Burton.

“It was my mother who taught me that, by picking up a book, I could ‘go anywhere’ and ‘be anything,’” Burton said in a posting on Kickstarter.

Contributors can claim rewards ranging from autographed memorabilia to a private dinner with Burton to a chance to put on the visor that the actor wore on “Star Trek.”