I would say that you cannot.
Both getComputedStyle(yourElement, '::selection').backgroundColor and getComputedStyle(yourElement, '::-moz-selection').backgroundColor returns transparent as the default value, and the browser will not override the os default value.
(It is worth noting that if you set transparency, the default os' value will be overridden).
I donβt think browsers have access to the os default settings, and if they do, they probably wonβt allow any website to access it that easily.
source share