There are a few alternatives to hair color, although that works also.
First, there is Melancor. I've been taking it a few months, and it appears to be working. The few gray hairs I had have now almost completely disappeared. Also, I had a few gray hairs in my mustache, and they have turned normal colored too.
Second, copper peptides reverse gray color on some people. Although I use Folligen, I don't use it on the sides of my head, where gray had been starting to appear, so I attribute losing the gray there to Melancor. However, for some people, copper peptides do reverse graying. According to Loren Pickart, the reason for this is that "the formation of hair pigment is controlled by a copper enzyme called tyrosinase." I have started spraying Folligen on my beard once a day to see if it will get rid of the gray hairs I have there.
Third, there is always Grecian Formula and similar knockoff products. These work very well. Until I took Melancor and it started to work, I used this, and one or two applications would eliminate the gray and return my natural color. I would have to use it once a week to keep it that way. Using it for a few hours on a Saturday morning, and then washing it out, would be enough. These products contain lead, which is why some people don't like them, but when used on the hair and scalp, the lead doesn't find it's way into the bloodstream. The product I use has a nasty odor, though, so I can't use it if I'm going to leave the house.
The thing I like about these three approaches rather than hair color is that with hair color, you can't consistently match your natural color exactly, no matter how much you try. And the color can vary from application to application, sometimes too dark, sometimes not dark enough to cover the gray, since how dark it gets depends on precisely how long you leave it in your hair. Even 30 seconds can make a difference. Also, why color your entire head when you're gray only in spots? With hair color, you have no choice, and I could never get it to look completely natural. None of this is a problem with the other three approaches.