Wheel bearing grease is OK for ball joints, especially if you're using a high temperature wheel bearing grease.
The color of the grease is not as important as the ability to withstand high temperatures which is also crucial for ball joints.
Ball joints experience high temperatures during normal driving even though it doesn't seem like it, so you should use a high temperature wheel bearing grease to prevent the grease from drying out or becoming ineffective.
Aluminum based grease is also good for ball joints.
The different colors of grease are for identification of the grease.
Grease comes in different colors mainly to be used as a visual aid and indicator for what the grease is used for.
For example some grease comes in colors like red for high temperature use and blue grease for wet conditions.
The grease color though is not a reliable indicator of the greases overall performance or suitability for any specific application.
The manufacturers use color in grease to differentiate the grease types, which makes it easier for you to identify the correct grease for a certain application.
The color of the grease can also help you quickly identify the different types of grease, especially when you're dealing with multiple grease points or routine maintenance.
The color of the grease does not guarantee the performance of the grease, like it's load carrying capacity , oxidation stability or water resistance.
The grease color can also change over time due to factors such as thermal degradation, oxidation or even contamination, which can indicate a change in the quality of the grease.
Blue grease is often associated with general purpose, water resistant greases, suitable for wet environments, like marine or wheel bearing applications.
Yellow grease can indicate biodegradable greases for use in light machinery or agricultural applications.
Green grease can signify the grease has environmentally friendly formulations or heavy duty uses and sometimes with added synthetic oils or additives used for resistance to oxidation and corrosion.
Red grease is often used for high temperature or heavy duty applications, although red grease can also be used for other purposes.
White or undyed grease is often used in food grade applications or machinery in which incidental contact with food is possible.
And gray or black grease can indicate that the grease has molybdenum disulfide or moly graphite that enhances wear resistance in severe conditions.