Origin of "blue" for rude?

This question Why do we talk a blue streak?, had me thinking—why do we use blue for rude ?

Dictionary.com has it: lewd, indecent recorded from 1840 "(in form blueness, in an essay of Carlyle's)" and a link to blue laws, which means almost the exact opposite, but no origin.

Source: http://dictionary.reference.com/browse/blue


Solution 1:

According to Green's Dictionary of Slang, in the eighteenth century itinerant Parisian booksellers covered their seditious or obscene material with blue paper; the first citation for blue meaning obscene comes from 1818.

Farmer and Henley note the French Bibliotheque Bleu, a series of books "of very questionable character", although they also suggest it may be derived from the "blue dress of harlots", which seems to me somewhat less likely.