Your vision must be at least 20/40 for near and distant vision with or without corrective lenses, and you must be able to perceive those colors necessary for the safe pilot performance. Unfortunately, if you are color blind, you will likely be unable to become a pilot. For general health and medical related questions, refer to the AOPA medical subject reports. https://www.aopa.org/go-fly/medical-resources
A pilot must be in good health to fly, therefore we encourage a healthy lifestyle for our flight students: no smoking; little or no consumption of alcohol; healthy diet; regular exercise; and regular rest/sleep. Your good health protects your livelihood as a commercial airline pilot. Develop good health habits to enjoy a long career in aviation.