yes . You need transit Visa . (if you are a SL passport holder) . This is the level of SL passport.
Even Indians are given better treatment and they enjoy 14 day on arrival visa to go out from Airport(no need to have transit visa for them0
If you are going for official trip and holding a Official Sri Lankan Passport(for Govt officials- not diplomats) do not need transit visa. They can go out also but this is sometimes not known to HK immigration officer. So it is better to have a normal passport and obtain visa even for an official visit.
Obtaining transit visa is not difficult can be obtained within few days. But visa fee applies. If there is a child , irrespective of having a separate passport they also need transit visa.