Since browsers don't allow websites to detect the link colour, we can just trick the user into telling it for us.
https://varun.ch/history
After posting that, I got some emails from others, and someone shared a cool technique involving detecting how long it takes to paint the link to the screen. https://ndev.tk/visted/
It detected HN and other sites.
Disabling javascript saves the day again?