Lightsaber color depends on kyber crystal. In some cases the color depends on the personality of the user, these are all the lightsaber colors :
Blue llightsabers are the most common lightsaber color. Everyone who starts training as a jedi has this color of a blade. Even most of the jedi masters still use this color
Greenlightsabers are awarded to jrdi grandmasters and jedi that have reached their full potential
Red lightsabers are used by sith. In order to get a red lightsaber in your hands you must find a blue kyber crystal and with the sith emotions (hate, anger, eg) the kyber crystal cracks and becomes red
A Purplelightsaber has only appeared one time in the nine Star Wars movies, Held by jedi grand master Mace Windu. We don't know exactly what the color means but some say that it means the user can control both the light side and the dark side (since the color blue matched with the color red equals the color purple) .
The coloryellow has only been seen one time in the movies wielded by Rey Skywalker. It is a rare lightasber color which represent a perfectly balanced jedi.
When a red, broken lightsaber crystal becomes healed it turns into a white crystal.