Green’s Dictionary of Slang

blue n.2

[blue adj.3 ]

1. [mid-19C+] a ‘smutty’ anecdote, a piece of pornography.

2. [late 19C] an obscene or libidinous anecdote.

3. obscene language.