Blue diode lasers emitting 5 mW continuous-wave power around 400 nm have recently become available. We report on the use of a blue diode laser together with a 30 mW red diode laser for sum-frequency generation around 254 nm. The ultraviolet power is estimated to be 0.9 nW, and 35 GHz mode-hop-free tuning range is achieved. This is enough to perform high-resolution ultraviolet spectroscopy of mercury isotopes. The possibility to use frequency modulation in the ultraviolet is demonstrated; however, at present the ultraviolet power is too low to give advantages over direct absorption monitoring. Mercury detection at atmospheric pressure is also considered which is of great interest for environmental monitoring.