No, contact lenses are worn to provide vision aids. And colored contact lenses are worn to fashion, maybe, also for vision aids. But they can't protect eyes in the same way as sunglasses do. However, Sunglasses can protect the eyes and skin around the eyes from UV rays and strong light. Thus to provide you comfortable vision. Of course, if you are with poor vision, prescription sunglasses are available to satisfy you.
Contacts can help correct our vision problems. Colored contacts can change the color of our eyes. Sunglasses can block harmful UV rays and filter glare. The prescription sunglasses can correct our vision problems too. So they work differently.
There isn't that kind of contacts that can work the same as a pair of sunglasses do. Sunglasses have dark lenses and they can filter at least 70% light. Usually we won't need a pair of sunglasses indoors because there are less light and we needn't filter light anymore. But we usually wear contacts for a whole day. We can't put on or take off them from time to time within a day. So logically we don't need that kind of contacts and manufactures won't make that kind of contacts too.
They work totally differently. Some people think that colored contacts can work the same as sunglasses. But actually the center of the colored contacts are also transparent so then lenses can't color what we saw. If we move your eyes, we may see some colors in the dege of our vision but the color won't cover our vision as sunglasses often do.