Upvote:1
If you don't pass immigration in Panama you don't need a visa:
International travellers in transit in Panama do not require a visa provided they don't pass immigration and are staying less than nine hours.
(Source: VisaGuide)
A Colombia visa is not required:
A visa is not required for direct airside transit through Colombia. Traveler must be in possession of a valid passport and onward ticket, and must remain in the airport's transit area. Proof of Travel Arrangements: Confirmed round-trip or onward airline ticket.