The way to obtain the default background color set by the user, is to call function getDefaultBackgroundColor() { let div = document.createElement("div"); div.style.backgroundColor = "canvas"; document.documentElement.appendChild(div); let color = getComputedStyle(div).backgroundColor; div.remove(); return color; } This does not work with WebKitGTK 2.28.1/Epiphany 3.36.4. In particular it allows setting custom CSS, and body.background-color in it, but it is unclear how to use the Canvas keyword as calor there. • How to configure WebKit to change the default canvas system colour, in terms of https://www.w3.org/TR/css-color-4/#css-system-colors • Please make the snippet above work. See also https://bugzilla.mozilla.org/show_bug.cgi?id=1666127 and https://gitlab.gnome.org/GNOME/epiphany/-/issues/1344
Ideally WebKit would support color: canvas and would allow users to change it, otherwise you need to use user stylesheets which don't reliably work.
<rdar://problem/69397317>