Zachary Levi is to star in 'Harold and the Purple Crayon'.

The 40-year-old actor will feature in the Sony Pictures live-action adaptation of Crockett Johnson's best-selling children's book.

The story centres on curious four-year-old boy Harold who, with his purple crayon, has the power to create a world of his own simply by drawing it. It is Johnson's most popular book and six other stories followed.

David Guion and Michael Handelman – whose previous credits include 'Night at the Museum' and 'Dinner for Schmuks' – are writing the screenplay.

John Davis is producing the film through his Davis Entertainment banner.

Hollywood has long-hoped to adapt the story for the big screen but development hell has previously ruined plans. Steven Spielberg's Amblin Entertainment and Will Smith's Overbrook have tried to adapt the project.

Zachary plays the titular role in DC Extended Universe movie 'Shazam!' and will also lead the cast of 'American Underdog: The Kurt Warner Story'.

He will portray the legendary NFL star Warner as the story chronicles the sportsman's journey from stocking shelves at a supermarket to becoming an NFL MVP, Super Bowl winner and a Hall of Fame quarterback.

Zachary said: "Kurt's story is one of relentless faith - in his own abilities but even more so in a higher power.

"When I read Kurt's story, I identified with the quiet strength he found to persevere - that's something I think anybody can recognize in their own lives.

"This is the kind of underdog story that sports movies are all about, and the fact that it's true makes it even more special. I'm thrilled to be part of bringing his story to audiences."