The HC4020 leads look almost like the copper leadframe is showing thru the plating. Does the color come off or is it the underlying metal? If the plating is tin, perhaps it's "tin pest" where tin simply disintigrates. I believe the date code is from 1989 and I don't recall any manufacturer having any particular problem with pin corrosion. Perhaps heat caused this or at least accelerated it. Does the chip have a VDD-VSS short?
Back in the 70's TI used silver (or at least something that tarnished like silver) on their ordinary DIPs. A blackish deposit would show up after a few years and if IC sockets were used there'd be a good chance of intermittant connections. One system spent a couple of years in Edmonton, Alberta where there are a number of oil refineries emitting sulfur dioxide. The TI pins were totally black, as if I had used a marking pen on them. On a lark, I tried some Pepsi - the phosphoric acid took the tarnish off but then I had a problem with the sugar.
I was looking at some chips that I were in some conductive foam that had disintigrated. For the most part the pins were not corroded, but there was some black glop that's hell to remove.
Cheers,