Color schemes on pkg.go.dev
The pkg.go.dev site currently renders either a light color
scheme or a dark color scheme based on your web browser’s prefers-color-scheme
preference (typically, this is based on your operating system’s color scheme
settings). The site does not allow you to manually toggle the color scheme on
the page UI.
But there is a workaround if you still want to manually pick a color scheme on the site. With a pkg.go.dev page open, enter the following in the browser’s JavaScript console (cmd + alt + c in Safari).
document.cookie = "prefers-color-scheme=light" // for light scheme
or
document.cookie = "prefers-color-scheme=dark" // for dark scheme
Reload the page after.
These cookies were once being used to let users toggle the color scheme, but the feature was rolled back due to an issue. But the cookies still work partially.
I much like the light scheme on the site, though my operating system color scheme is dark.
Update: There is a working color scheme switcher button at the bottom of pkg.go.dev pages now.