Stan Lee died yesterday, at the age of 95.

Stan Lee’s vision of multiculturalism defined the world outside our window

Yesterday, Stan Lee died. He was the creator, in collaboration with others, of countless superheroes, including Spider-Man, the Hulk, Daredevil, the Fantastic Four, Black Panther, X-Men, Thor and Iron Man. These characters are now the engine of the global blockbuster movie industry, as well as countless cartoons, children's toys and, of course, comics. They are part of the wallpaper of our world. Barely a day will go by without you spotting them somewhere, whether it's in a shop window, or the T-shirt of a passerby, or a lunchbox. It is hard to think of a single other figure who contributed so much to the culture we live in today.

There was a dark side to his animated public persona. You could spend an article talking about the failure to properly reward other creators, or the charges to fans for autographs, or the weird and unpleasant recriminations around his household in his later years. Underneath the superhero shine, there was a money machine, working as money machines always do. But today isn't the day for that. Today is the day to recognise his achievements. He wanted to portray the world outside your window. And that world was a vibrant place of multicultural myth-making.

Before Lee, comics had become a fairly stuffy affair. The Golden Age of comics, in the late 30s and early 40s, when characters like Superman, Batman and Wonder Woman were created, was originally imbued with a odd type of transgression. Superman was the product of Jewish immigrants to the US and acted as a deified version of that experience. Batman had a troubling noirish elasticity. Early Wonder Woman comics were obsessed with ideas of loving submission and female superiority.

But in the 1950s, the genre had been targeted by moral puritans. Psychiatrist Fredric Wertham's book 'Seduction of the Innocent' claimed, among other things, that the stories of Batman and Robin were "psychologically homosexual", triggering a moral panic among legislators and parents. The Comics Code Authority was set up, demanding strict moral guidelines in stories. The  "sanctity of marriage" had to be emphasised in romance. Figures of authority would be presented in ways which promoted respect. "In every instance good shall triumph over evil," it demanded. It was an artistic death sentence. The readership left in droves as the creativity and daring was regulated out of existence.

But regulations rarely work the way they're intended. They tend to push things in weird directions, as people try to game the system. For many superhero comics, like Batman, the hero was pushed away from street-level crime stories towards grand and colourful sci-fi plots, which ended up linking arms with the psychedelic drug-infused hippie culture of the 60s. This was picked up later by writers like Grant Morrison to make a kind of mind-expanding anarchic infrastructure to the genre.

But Lee's response to this stifling culture was to bring back readers by humanising the superheroes. The universe he created, in an unsurpassed frenzy of creativity in the 60s, was designed to reflect the "world outside your window". Instead of fictional cities like Metropolis, which represented sun-lit progress, and Gotham, which represented gothic noir, stories were set in real locations. The characters were chiseled away at too. The square-jawed moral perfection of characters like Superman were replaced with fundamentally flawed, bickering personalities, whose own weaknesses and failings drove their narrative arcs.

Lee, who was himself the child of immigrants, populated his universe with a colourful collection of characters, from different classes, races and sexes, and with different personalities and body-types. It was a kind of lunatic multiculturalism, a place where diversity was injected into every element of the stories.

The Thing was rough-and-ready, working class and from the Lower East Side. His best friend was the thin, intellectual, distant Reed Richards. Spider-Man was a nerdy orphan living with his aunt and uncle. Scientist Bruce Banner was turned into a Jekyll-and-Hyde green monster which reflected his own internal angst. Iron Man was a billionaire industrialist, who would later develop a drink problem. Thor was a Norse God, who spoke in cod-Shakespearean language. Daredevil was an inner-city lawyer whose disability gave him enhanced perception. Black Panther was an African king, of a nation which was far more technologically advanced than anything in the West. The X-Men were mutants who were hated and feared by society. They functioned as a metaphor for whichever minority the writer wished to project onto them, from race, to sexuality, to, in the recent Logan movie, immigrants in general. These characters were jumbled up together, offering a crazed milieu of language and preoccupations and striking visual imagery.

Lee had taken the Platonic form of superheroes, they way they encapsulate one idea perfectly, and injected real life drama into them. By doing so he made them relevant. Any kid reading a comic could picture themself as the weedy, geeky Spider-Man. He allowed people to feel they could act like superheroes, rather than just look up to them. The relevance he provided was not just emotional. It was political. By making them like us, the comics implicitly suggested we could be like them.

This was reflected in his Stan's Soap Box, a little comment section he'd tuck away in the comic, written in his rhythmic splashy style, which would regularly kick back against racism and discrimination. "Let's lay it right on the line," he wrote in 1968, "Bigotry and racism are among the deadliest social ills plaguing the world today."

Years later, towards the end of this life, he put out a video making a similar point. "Those stories have room for everyone, regardless of their race, gender or color of their skin. The only things we don't have room for are hatred, intolerance and bigotry." This was moral instruction, but of the best kind. It opened doors, rather than closing them.

It wasn't perfect, by any means. The Marvel universe was still overwhelmingly populated by white male protagonists, even if they were varied within that context. But this attitude, and the bizarre, super-serum-injected sense of genre multiculturalism, embedded itself into the DNA of the Marvel universe. When I was growing up in the 80s – decades before a female Doctor Who was a twinkle in a BBC producer's eye – a black female character called Storm was already leader of the X-Men. It continues in Marvel comics today, where a half-black half-Latino kid called Miles Morales wears the Spider-Man costume and one of the most popular current characters is Ms Marvel, a Muslim teenager in New Jersey.

Now that these characters have gone mainstream, out of the comics page and onto cinema screens across the world, they have taken that cultural mechanism and spread it to places his books would never have reached. The recent Black Panther film, starring an almost all-black cast and directed by an African-American, took $201.8 million in the US alone in its opening weekend, making it the fifth biggest opening of all time. It's the the of financial performance which fundamentally recalibrates Hollywood's calculations about the viability of future projects.

One of the reasons that's possible is because of the flawed characters at the heart of these superheroes, the fact that the drama does not lie in their costumes, or their antics, or even their identity, but in their personality and the tiny tragedies that Lee injected into each of them as a driving motive.

This is now Stan Lee's world and we just live in it. It's a welcoming, open world. We have a lot to thank him for.

Ian Dunt is editor of Politics.co.uk and the author of Brexit: What The Hell Happens Now?

The opinions in politics.co.uk's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners.