From the root ram/ran/raN, to rejoice,with cognates in other Indoeuropean languages, one gets the Sanskrit word raNa, whose only surviving meaning is battle or war. The root ji means to win, so raNajit is `victorious in war'.
However, it is also spelt differently, and that looks like it is derived from a root ranj which means to be dyed, to glow, to be excited etc. and also has Indoeuropean cognates. That ranjita therefore means coloured, literally or figuratively.
I do not know if the second is a true etymology or a variant of the former. The pronounciations were completely different in Sanskrit, but they have merged in some North Indian languages like Punjabi.
In any case, Ranjit Singh, the Lion of Punjab, was a very important historical figure.