Starting with 6 red socks, twice the number of blue socks as red meant Joseph had 2*6=12 blue socks.
With one less pair of red socks than white socks, this meant 2 fewer red socks than white, for a total of 6-2=<<6-2=4>>4 white socks.
Also, 12 blue socks=6 pairs of blue socks.
With three more pairs of blue socks than pairs of black socks, this means he had 6-3=<<6-3=3>>3 pairs of black socks.
And three pairs of black socks corresponds to 3*2=<<3*2=6>>6 black socks.
Thus, in total, he had 6+12+4+6=<<6+12+4+6=28>>28 socks.
#### 28