Little rainbows have been popping up everywhere lately - on Facebook, in Skittles adverts, soon they’ll arriving on London’s streets. In fact, the rainbow flag has been flying over Tate Britain for some months now. The gallery will be kicking off the London Pride celebrations next Saturday with a special Tate Lates at their exhibition Queer British Art.

The show, focused solely on LGBTQ artists, charts the century or so between 1861 when the death penalty for sodomy was abolished up to 1967 when another bill decriminalised male homosexuality. The works on display that emerged in this century in which artists ran the risk of trading free expression of their desires with their freedom, are a celebration of defiance, both coded and candid.

the exhibition is celebration of defiance, both coded and candid

The exhibition encompasses art in its traditional forms – there are plenty of paintings here, John Singer Sargent’s portrait of Vernon Lee to David Hockney’s tongue in cheek art school paintings of oiled up athletes from the muscle mags, equally, there are also plenty of surprising objects. Amongst letters, photographs voice recordings and masks there’s a tin filled to the brim with guardsman’s jacket button. Each of the 200 represents a solider that the artists Denis Wirth-Miller and Richard Chopping bedded. The pair met in 1937 and became civil partners in 2005. In another case there several library books, swiped from an Islington library in the mid-60s by Kenneth Halliwell and Joe Orton. They borrowed the books and returned them with new and improved covers. One (straight laced) romance novel called the ‘Queen’s Favourite’ sports a cover of two men about to have sex, The Collected Plays of Emlyn Williams are retitled Knickers Must Fall and Fucked by Monty. For every fun piece like Noel Coward’s dressing gown, for each joyful, romantic story like the one of the painter Duncan Grant and the poet and novelist Paul Roche who met at the traffic crossing at Piccadilly Circus and were together for 32 years, there are ones sharp with tragedy.

Simeon Solomon’s 1864 painting of Sappho begins the exhibition, the painting which in pre-Raphaelite tradition, the painting is wispily romantic, suffused with flattering soft-focus light belies the heartbreak and injustice that befell the artist; Solomon was arrested for cottaging, once in London, and again in Paris. He spent the last years of his life in workhouse, an alcoholic, abandoned by his friend. In another room hangs the lemon yellow door to the cell in Reading Gaol in which Oscar Wilde was imprisoned for gross indecency.

The common thread of queerness is enough to tie these disparate artists together, this is a portrayal of a community from dozens of different angles, distinctive for its diversity.

Some of the works are explicitly, graphically, queer; Francis Bacon’s 1954 painting Two Figures in Grass depict two men going at it (albeit in the blurred whirl of frantic brushstrokes) in a field, Keith Vaughn’s Out is a rather more sedate line drawing of two men kissing, others are little more than still lifes, quiet, unassuming impressionistic works with colourful stories. Ethel Sand’s work, belonging to the aesthetic and impressionistic naturalism movements promoted by the famously sexually liberal Bloomsbury group, is characteristic. In the 1911 painting Tea with Sickert we peep over the shoulder of a woman in a fantastically orange hat, the table is set for tea, directly opposite Sickert reclines in a chintz chair. The romantic liaison here does not involve Sickert as might be assumed, but Sands and her lover, the woman in orange, Nan Hudson. This veneer of a particular sort of genteel Englishness is replicated in Sand’s The Chintz Couch in which she picks out the comfortable interiors of her home with Hudson in yellow ochre and pale duck egg blue.

The Bloomsbury Group which included Virginia Woolf (here represented by a Man Ray photograph) and her lover Vita Sackville West (resplendent in a red hat in a portrait by William Strang) in many ways form the lynchpin. Duncan Grant’s imposing Bathing dominates the penultimate room. Its muscular swimmers diving in choppy waters and hauling themselves in boats speaks both of coded desire and the yearning to find relief from alienation. “How much I want to scream sometimes here for want of being able to say something I mean,” he wrote to John Maynard Keynes, lifelong friend and an occasional lover: “It’s not only that one’s a sodomite that one has to hide but one’s whole philosophy of life”. There is little to tie together the works inQueer British Art other than the sexualities of the artists involved. Yet this common thread is enough, rather like the photographic collages Hockney produced later in life, this is a portrayal of a community from dozens of different angles, distinctive for its diversity.

Queer British Art is an ode to the artists who refused to be silenced; dared to love fiercely, chose to counter the hate with joy and sensuality, wit and passion. Theirs is a story worth the telling.

The exhibition does well to acknowledge that though great strides have been made for inclusion there is much still to be done, even inside the LGBTQ community which can be just as bound by prejudice as the heteronormative world outside. “I’ve been all the letters of LGBT and hated them all” declares Shon Faye in a blistering video installation. Intersectionality within the community with regards to race is often lacking, Sabah Choudrey, a Pakistani trans activist, draws attention to this with his commentary on the theatrical masks created by Oliver Messel. Many, he points out, still wears masks of assimilation that many in his community to hide their brownness and gender identity even when they come out.

As we move from decriminalisation to marking other milestones such as the legalisation of same-sex marriage, hopefully the Tate may be inspired to curate a new show showcasing queer art beyond 1967. With any luck, they might even include more queer artists of colour.

Even in its present iteration this exhibition to be celebrated. Queer British Art is an ode to artists who have felt strangers in their own cities and countries, who despite being ostracized, demonised, and criminalised by the wider society in which they lived, refused to be silenced; dared to love fiercely, chose to counter the hate and suspicion with which they were treated with work brimming with joy and sensuality, wit and passion. Theirs is a story worth the telling. As I made my way around the exhibition I found myself poring over the stories behind the works just as much as over the art on display, and in the end, what could be better than that?

5 stars. Queer British Art (1861-1967) is on at Tate Britain until 1st October Tickets: Adult £16.50 (without donation £15), Concession £14.50 (without donation £13.10)