Hook? Change all internal links when param is set

Hello all,
i have a question i couldn’t find an answer yet:
In may scenario, i have built a button that toggles the appearance of the website from a color mode to a contrast mode (b/w) via a set param.
The color mode has no param, the contrast-mode has a param (/contrast:true).
Here is my question: Is there a way (possibly through a hook) to change all internal links (header main menu plus relative links within text fields) once the param is set?
The idea is that once you toggled to contrast-mode the site should stay in that mode…
Maybe there is even a simpler solution to that and i just don’t get it :wink:

IMO, it would make more sense to control this via the session or a cookie.

Thanks @texnixe . Works like a charm!