Almost seven years ago, I wrote a series of articles about the different ways of writing colors in CSS. One of them covered named colors and, among other things, took a close look at system colors.
A lot has evolved since then: specifications have changed, new features have landed, experiments have been deprecated, and several new system colors have been added to the standard. So, it felt like a good time to revisit these keywords and see what values modern browsers actually return, and how their implementations compare.
What are system colors and why are they important?
System colors are a set of predefined CSS color keywords that represent colors associated with the user interface. They generally reflect default colors chosen by the user, the browser, or the operating system, and browsers use them in their default user-agent stylesheets.
Beyond browser defaults, system colors matter to web developers for three big reasons:
- Forced colors mode: when a user enables a restricted color palette (such as Windows' high contrast mode), browsers override most author-defined colors and backgrounds. System colors expose that palette, allowing your page to adapt and integrate with it.
- Light and dark color schemes**: system colors can respond to the active color scheme, providing different values for light and dark modes to match user preferences.
-
Built-in accessibility pairs: the specification defines complementary foreground/background pairs intended to provide contrast readable combinations. For example,
CanvasandCanvasText,MarkandMarkText, orButtonFaceandButtonText.
What are their values?
Here is the current list of standard system color keywords and what each represents (we will look at their actual computed values across browsers in the next section):
-
AccentColor: background of accented UI controls such as a radio or a checkbox. -
AccentColorText: text color in an accented UI control. -
ActiveTex: text in active links (traditionally red). -
ButtonBorder: border color for buttons (duh!) -
ButtonFace: background for buttons. -
ButtonText: text color on buttons. -
Canvas: background color for application content or documents (not only<canvas>!) -
CanvasText: text/foreground color in application content or documents. -
Field: background of input fields. -
FieldText: text in input fields. -
GrayText: disabled text (usually a gray shade, thus the name, but not necessarily gray) -
Highlight: background of selected text (e.g.::selection). -
HighlightText: color of selected text. -
LinkText: text in a non-active non-visited link. (traditionally blue). -
Mark: background of text that has been specially marked (e.g., with<mark>). -
MarkText: color of the text in an element that has been specially marked. -
SelectedItem: background of selected items (like in a selected checkbox). -
SelectedItemText: text color in a selected item. -
VisitedText: text color in visited links (traditionally purple).
The Colors
In my original article, I included a small comparison table showing 12 system colors across several browsers. For this update, I decided to build a modern version, expanding the list to all 19 current keywords and reflecting today's browser ecosystem (goodbye, Internet Explorer!).
I left out other Chromium-based browsers that returned the exact same values as Chrome (sorry, Edge, Opera, and Vivaldi), and instead added two newer independent browser-engine projects building their own engines from scratch: Ladybird and Servo (best of luck to both!).
The process was relatively simple, although a bit tedious: I created a table with the different system colors applied as background colors, opened it in each browser, and used getComputedStyle() to retrieve their RGB values. For simplicity, and to make better use of space, I then converted those values to hexadecimal and added them to the comparison table.
Keep in mind that system color values change from browser to browser and across operating systems. The tables below show the resolved values for six browsers tested on macOS in both light and dark modes.
Some Findings
Many values are shared across browsers
At first glance, the rows in the tables above look remarkably consistent. For example, the values of Canvas, CanvasText, LinkText, and VisitedText are the same across all tested browsers in light mode.
Even when browsers diverge, they often stay suspiciously close. Take AccentColor as an example: the value is almost the same across Chrome (#0075ff), Safari (#007aff), and Firefox (#007bff)... but not quite exactly the same. It looks like the homework from a group of students who copied from each other but changed the answers a little bit so the teacher wouldn't notice.
Tor, Firefox, and Privacy
Tor Browser is built on Firefox (Gecko) and has a heavy focus on privacy and anti-fingerprinting. If you visit a browser-checking website with Tor, it may identify the browser simply as Firefox, particularly if it relies on user agent values.
But comparing their columns reveals differences in their system-color palettes. For instance, AccentColor is #0060df in Tor and #007bff in Firefox.
Combining that information with the user agent, it is possible to detect if the browser is really Firefox, or if it is actually Tor:
// to be run if user agent is Gecko/Firefox
const div = document.createElement('div');
div.style.color = 'AccentColor';
document.body.appendChild(div);
const accentColor = getComputedStyle(div).color;
div.remove();
// accentColor = rgb(0, 123, 255) ====> Firefox
// accentColor = rgb(0, 96, 223) =====> Tor
It's a small fingerprinting vector, and its reliability would need to be tested across different versions and configurations. Still, it's a good reminder that browser fingerprinting goes beyond user agent strings, and it includes CSS, too!
I wouldn't be surprised if the Tor team eventually aligns those values with Firefox, or prevents the exposure by returning a fixed value when getComputedStyle() is executed (similar to what happens with VisitedText).
Light mode, dark mode, and color-scheme
One unexpected behavior stood out while recording the color values for the tables: my computer was set to dark mode, but Servo was the only browser that automatically adapted its system colors to the OS color scheme without an explicit color-scheme declaration.
The other five browsers returned their light-mode colors by default. Adding :root { color-scheme: dark } made all six browsers return their dark-mode system colors.
The initial value of color-scheme is normal, which doesn't necessarily mean that a page will use the dark system colors when the OS is in dark mode (authors can explicitly opt in by declaring color-scheme). In my tests, Servo was the only browser that appeared to follow the OS preference without requiring that opt-in. I find that behavior more intuitive, but that's just my personal preference.
Ladybird and accessibility
As mentioned earlier, system colors are intended to form accessible foreground/background pairs, so it's interesting to check their contrast ratios in newer engines that are still actively under development.
In Ladybird, some of the current color combinations may fall short of WCAG contrast guidelines. For example, in dark mode, Highlight (#3daee980) is semi-transparent, while HighlightText (#141414) is a dark foreground color. When composited over the default dark page background (#1c1c1e), the resulting contrast ratio is only 2.97:1, which may not meet AA requirements.

Since Ladybird is fairly new and it is still under active development, these defaults will definitely evolve, but it is a great reminder to double check because even browser defaults may not be automatically immune to contrast issues.
Conclusion
The CSS color specifications have evolved considerably over the past seven years, and system colors have grown with them, from a handful of keywords into a richer palette designed for modern interfaces, different color schemes, and high-contrast environments.
Comparing their values across browsers also revealed some interesting differences, from Servo's automatic adaptation to the OS color scheme to the distinct palettes exposed by Firefox and Tor. Even something as seemingly harmless as a CSS color value can reveal more about a browser than you might expect.
Even if you don't use them in every stylesheet, understanding what system colors represent (and how different engines implement them) is a valuable tool for building resilient, accessible interfaces that respect user preferences.

