The slang meaning of "Seven/七" in Cantonese I have heard a few Hongkongers saying seven in a similar, likely identical, context. I assume they are addressing a person because when they say it, they make the L hand gesture. I could be wrong, but my intuition is that seven is a slang in Cantonese and means something like loser.

Did I guess it right? If not, what is the slang meaning of seven in Cantonese? Or is it just a random joke?

Thanks in advance!
It is a foul character, usually pronounced as "cat6".

The original character is "", which means "scrotum".  On the contrary, in modern slang uses, it refers to the penis in a flaccid state, and commonly written as "" or "柒".  The implied meaning is thus "useless", "stupid", etc.

Many people tweak the pronounciation from "cat6" to "cat1" (hence, "七"/"柒") to avoid speaking the foul character directly.  Other alternatives like "sat6" (實) are also used.