"Well paint me green and call me a cucumber! I just […]"
Although Eric Partridge wasn't always of the best reliability, it's worth noting that in this "Dictionary of Catch Phrases," he has an entry for a common version of this snowclone (as they've recently begun to be called by linguists), "cut off my legs and call me shorty." He quotes a source who suggests it was popularized by Phil Harris, who these days is mainly remembered as the jazz-loving, slang-throwing, skirt-chasing bandleader from Jack Benny's radio show.
A quick search of periodicals and structure dates that particular form of the expression to at least 1941, when it appeared in an article about teen slang in LIFE magazine.
Someone seems to have coined a term "Balk-isms" when referring to this. Yes, it seems to have come from Cousin Balki, who is an immigrant to Chicago in the TV show, and he often missaid things. Some of the things he said (missaid) included:
"Cuzzin, are you going to have a nervous break dance?"
"If everyone knew how to herd sheep, there would be no one left to write poetry."
"Patience is a virgin."
And the one that's relevant:
"Paint me green and call me Gumby."
It seems that this type of punchline first came out with "Balki", who also coined several others:
"Well bang my bongos and call me Desi"
"Well feed me garlic and call me stinky."
"Well, rope my feet and call me Dodi!"
"Well rub my chest and call me Vicks"
"Well, throw acid rain on my parade!"
"Well toss my greens and call me Ceasar."
This doesn't necessarily mean that he started off all these types of jokes, but it's pretty certain he popularized it.
Early recorded instances of 'well, paint me [a color] and call me [something]'
The earliest instance that a Google Books search finds of a relevant "paint me green" construction is in the title of a book by George Hesselberg, Paint Me Green and Call Me Fern: or, How to Walk With Your Hands in Your Pockets: Collected Columns (1991). One of the columns begins,
Well, paint me green and call me Fern, state government just keeps getting curiouser and curiouser.
Other "paint me green" Google Books matches include these:
"paint me green and call me Kermit" (from 1998)
"well, paint me green and call me a Martian" (from 2004)
"paint me green and call me pickle" (from 2009)
"paint me green and call me stupid all day" (from 2010)
"well, paint me green and call me a leprechaun" (from 2011)
"well, paint me green and call me a cucumber" (from 2013)
"waal, paint me green and call me Gumby" (from 2015)
"paint me green and stick me in a trash can" (from 2016)
But of course there is no reason to suppose that this is the actual chronological order in which these various formulations first came into use.
Google Books search results also turn up matches for "paint me yellow..." (starting with "paint me yellow and call me a cab" from 1990), "paint me orange..." (starting with "paint me orange and call me a school bus" from 1997), "paint me blue..." (starting with "paint me blue and call me silly" from 1999), "paint me pink..." (starting with "paint me pink and call me a pig" from 1999), "paint me white..." (starting with "paint me white and call me Frosty" from 2001), "paint me red..." (starting with "well, paint me red and call me Susan" from 2006), "paint me black..." (starting with "well, paint me black and call me a kettle" from 2014), and "paint me purple..." (starting with "well, paint me purple and call me a grape" from 2015).
The earliest of the Google Books "paint me [a color] and call me [something]" constructions is from a 1990 issue of The Comics Journal. This particular example is especially intriguing because the author seems to be attributing it to an era almost fifty years earlier than 1990 [combined snippets]:
"A Nightmare Scare" is six pages of wonderfully bizarre, unapologetic visual and verbal madness. [Basil] Wolverton's harsh, blunt 1940s bigfoot cartoon brushline and crosshatching add an extra layer of lunacy to his sunny suburban surrealism. Dialogue is peppered with rhymes, alliterations, and campy "Paint me yellow and call me a cab" humor.
The comic under discussion is Wolverton's Powerhouse Pepper comic series, which ran from 1942 to 1948. And I'm happy to report that the "well paint me yellow and call me a cab" line is indeed a direct quotation from "A Nightmare Scare" (the next-to-last panel on the final page). The Toon Treasury of Classic Children's Comics (2009) states that this particular six-page strip was published in 1943, which gives us a surprisingly early first recorded occurrence of the "Well, paint me [a color] and call me [something]" formula.
Antecedents of 'well, paint me [a color] and call me [something]'
Although it is cast in past tense, the earliest U.S. instance of "[Do something] and call [pronoun] [something else]" might be the sequence "stuck a feather in his cap and called it macaroni" from "Yankee Doodle." At any rate it has the same format, if you recast it as an imperative:
Stick a feather in your cap and call it macaroni.
Another early exclamation took the form "Well, dog my cats!" From Jack Crawford, The Poet Scout: Being a Selection of Incidental and Illustrative Verses and Songs (1879, recalling a conversation from 1876):
"Well, dog my cats, Jack, I never done that 'afore, but, consarn it, I was tuckered out; but I'll just swaller a drop o' that tea and ye can sleep for the rest o' the day."
Much more closely related to the "well paint me [a color]" exclamations are expressions of the form "Well cut off my legs and call me shorty," also from the early 1940s (or slightly before), cited in Grant Barrett's answer.
Conclusions
The earliest Google Books matches for "paint me [a color] and call me [something]" are from 1990 (for yellow) and 1991 (for green). But further research reveals a much earlier instance of the formulation, from 1943:
"Well paint me yellow and call me a cab."
The Life magazine quotation that Grant Barrett's answer cites offers an example of a closely related joke from the same era: "Well cut off my leg and call me Shorty," suggesting that the general form of the joke branched out in multiple directions aside from the "well paint me [a color]" wording. Plausible antecedents arguably go back to "Yankee Doodle," although the form of the expression in that instance does not by any means provide an exact pattern for the later constructions.