It doesn't matter how many of each color there are.
If there are two colors in the drawer, then if the first two are not a pair, then the third sock you pull out must match one of them.
So ... pulling out two could give you a pair, and three always must .
To ensure you have at least one matching pair of socks, you must pull out a minimum of 3 socks. This is based on the Pigeonhole Principle, which states that if there are two colors of socks, pulling out three socks will guarantee one of the colors will be pulled out twice. Therefore, regardless of the order, the third sock will always match one of the first two.
;