French law does not define what “coming from” (being “en provenance”) means. In particular, there is no questionnaire asking where you have been in the X days prior to entry, as there is some other countries and official websites make no mention of such a rule.
Intuitively, you are still “coming from” the UK if you are just having a layover somewhere. By the same token, driving from an airport very close to the border or spending exactly 24 hours in Switzerland shouldn't make a whole lot of difference. There is no hard and fast rule on how long you ought to stay in a green country to be considered as “coming from” that country but you should easily be able to decide for yourself if what you are doing is a genuine trip to Switzerland or just a “clever” way to go around the rules using a loophole and act accordingly. You also need to check Swiss rules.
Note that travel from amber list countries to France is not forbidden for unvaccinated people. It's restricted to “necessary travel” and requires testing and a quarantine. I assume you are considering a trip that is not allowed under those rules but it seems important to remember the distinction. Basically, if you are just trying to find a way to go to France for tourism, you may get away with it but you are clearly breaking the rules.