NOW who can beat the peddler man?
Most everybody should.
To beat him all around the town
Will do him lots of good.
A bright canary yellow
Is surely very cruel and
A most dishonest fellow.
Let's wait, and catch him that peddler man;
And let's select the words
Most fitting to rebuke him well
For selling painted birds.
Let's chase him up and down the town,
And chase him sidewise, too;
For he's a yellow fellow so,
We'll turn him black and blue.
John Martin's annual: a jolly big book for little folks, John Martin, 1917
In the 1800s selling painted birds was a classic scoundrel's con, and a common counterfeit. In 1862 Henry Mayhew and John Binny defined a 'duffer' as a someone who "sold fakes -- imitation perfumes and antiques, and falsely painted birds."
Apparently this was a surprisingly effective con; the 1866 The Every Day Book (a English Almanac), reprinted a letter to the Times from an anonymous citizen whose friend had fallen prey to this trick, having bought a number of brightly colored birds from a passing painter who claimed to have been given them by a patron who was moving house and could not take them. He then revealed the clever way they had uncovered this trick (too late, sadly, to catch the duffer): by wetting a cloth and smearing the bird's paint. (Google Books)
One might assume that the birds in question were primarily pigeons, but no. In London Labour and the London Poor, Vol. 2 (1861), Henry Mayhew spends a surprising amount of time delineating the bird market, most particularly those birds caught and sold in London: linnet, canary, bullfinch, goldfinch, chaffinch, greenfinch, lark, nightingale, redbreast, thrush, blackbird... and those are just the songbirds. The sparrow, apparently, was bought for children to use as a kind of living kite, and for wealthier men with too much time on their hands to shoot in 'sparrow matches'. Starlings were "the poor man's and the peasant's parrot" taught to speak and swear, although the bird-catchers had caused the local populations to collapse at the time of Mayhew's writing. Birds were the trading cards of the day.
And brightly-colored birds were worth a pretty penny. Foreign birds could sell for quite a lot, and "bird-duffers" took advantage of this by buying the cheapest birds they could and coloring them for resale. If, perhaps, you would like to give it a try, the greenfinch is a good bird for resale, as its light color and comparatively low price made for easy painting and high profit margins. They could be purchased for just two or three pence each, while the usual sale price for the doctored bird was five shillings -- approximately a 2000% markup. Of course, this ignores other costs, such as that of the paint and of hempseed, which acts as a stimulant to perk the bird up (but take care, an overdose may kill them).
Not all duffers were so black-and-white, however. Some sellers admitted to helping a faded canary along with a bit of yellow dye or buffing a blackbird or jackdaw with the grit off a frying pan to add a darkness and luster to their coat. Apparently it was also common to paint or varnish the beak and legs of birds, although exactly why is unclear. And, as you may have surmised, the hempseed trick could also be used on otherwise un-duffed birds.
Painted birds are not limited to local fauna, however. Parrots and other foreign birds were also 'touched up' to make them look brighter or more exotic, and this was no small trade. While the street beggars did not usually have access to such birds, sailors did. It was common practice to allow sailors, even sailors in the royal navy, to bring back a bird when returning from far ports -- a practice so predictable that if a ship did not moor in a foreign port, the locals would often row out to the ships to sell the sailors their birds. This was a smart investment on the part of the sailor, but a spot of paint could make it an even better one. A common parrot or cockatoo was easily sold to an inn or tavern (they were all the fad), but one with unique markings might be sold to a wealthy gentleman.
Mayhew believed that he was writing after the peak of the bird-duffers time, although he noted that the market was cyclical. It appears that even if the market was slaking in London, the con would still have legs in more remote towns and villages for years yet. I suspect that by the time of John Martin's poem, painted birds were a well-known and probably not oft practiced con. It's rather a pity that pig in a poke stayed in our vocabulary, but 'painted birds' did not.