Both of them can protect your eyes from UV rays. There are sunglasses with different qualities. Some of them can provide you with 100% UV protection while some can only block 98-99% UV rays. The sunglasses with 100% UV protection are the best sunglasses. As to the color of the lenses, different color has different functions. Brown or green lenses can provide a better contrast while black or grey lenses can filter more light. You can choose the color according to your needs. Hope this helped!
If you have dark skin or dark hair, you can choose black lenses. If you have light skin or light shade hair, you can choose brown lenses. But if you are an athlete, I suggest you to choose brown lenses because you can see things more clearly.