Socks have evolved over the centuries from the earliest models, which were made from animal skins gathered up and tied around the ankles. According to the Greek poet Hesiod, in the 8th century BC, the Ancient Greeks wore socks called "piloi", which were made from matted animal hair.
The basic rule of thumb for men's socks is an easy one: The color of your sock should match the color of your trousers. That means wearing black socks with black trousers, dark gray socks with charcoal trousers, blue socks with your blue jeans, and so on.
So if you are wearing navy blue pants, you should wear navy blue or midnight blue socks. The secondary rule is that you are wearing a suit or pants on the lighter side of the color scale, it's okay to match your sock to the color of shoe.