Definitely a programming task, although even then, I don't think you'll get color values as fine as that, but I could be wrong.
Yes you would likely need js to do this but I guess if it's a link you are clicking to take you somewhere else then you will need to store a cookie each time the link is clicked to keep a record of what colour it should be so that it can updated each time.
You can use hsla colours to make it easier to change programmatically.
It would need a click event on the link which would then increment the colour and then store that colour as a cookie. On revisit the cookie would be read and the correct color re-instated.
Thank you, i'll post in the JS forum