Amos seems to be correct for current usage, but Curmudgeon's definition also holds; blue for drunk goes back to 1813.
Some others for drunk- blue-fuddled, blue-corned, blue as razors; all from the 1820s.
Lighter, Historical Dictionary of American Slang.