Three color continuous-wave (CW) laser emissions with constant frequency separation are generated in the near-infrared (NIR) region using a dispersion-compensated optical cavity filled with hydrogen gas. By focusing these laser emissions into second-harmonic generation (SHG) crystals, multiple second harmonic signals and sum-frequency signals are generated in the near-ultraviolet (NUV) with a constant frequency spacing. Up to five colors of these NUV CW laser emissions can be generated simultaneously by using SHG crystals with different orientations. The interference between the second-harmonic signal of one NIR laser emission and the sum-frequency signal of the other two NIR emissions was observed experimentally, indicating mutual phase coherence among the NIR laser emissions. The phase coherence allows the synthesis of a train of ultrashort pulses with a THz repetition rate in both the NUV and the NIR by using the CW emission lines.