The Codex Color page begins with a note that some colors differ between light and dark mode, and that using design tokens ensures the right color will be used automatically. While this is a noble goal, in practice it’s still not uncommon to have to refer to the underlying hex codes; two use cases I’ve encountered several times are:
- Creating or reviewing Gerrit changes that replace hard-coded colors with design tokens, and checking whether the token matches the old hard-coded value or not.
- Creating or reviewing on-wiki changes that prepare a template, gadget or similar for dark mode by using the var( --token-name, #abcdef ) pattern, and checking whether the fallback matches the token value.
In both cases, if you’re looking at the Codex Color page in dark mode, you’ll be seeing the “wrong” token values there, and will create bad changes, be confused, and/or waste your time before realizing your mistake. This has happened to me at least four or five times now, and I’ve also seen it happen to others, e.g. @Nemoralis here on Commons. IMHO, experience clearly shows that the note at the top of the page is not enough to prevent this mistake from happening again and again, and we should find a better way to make the page less of a footgun.