Red safelights were used for orthochromatic lithography film which could not see red. Of course as printers go digital this film is becoming difficult to find. Ilford made ortho film until their monetary problems last year. Don't know if they still supply it. Extremely interesting and useful material if you can find it.
Some Bergger papers also call for red safelight, according to the information on their website. Don't know if that material is still available either, after the trouble with Forte.
Yellow safelight is only for print paper. Years ago when there was much more contact printing being done, two colors of yellow filters were sold by Kodak, one which was lighter for relatively slow contact paper and another which was deeper for faster enlarging paper.
In practice, I have red and yellow safelights virtually interchangeable when working quickly with dim bulbs placed more than three or four feet from my light sensitive material. Conversely, most safelights (of the proper color) are not safe when used too close and for extended periods of time. Kind of like so-called "bullet-proof" vests which the manufacturers only claim to be "bullet-resistant".