System colors
The CSS system colors -- `Canvas`, `CanvasText`, `ButtonFace`, `Field`, `Highlight`, `Mark`, `AccentColor` and the rest -- are what the browser paints an unstyled document and its native controls with, and the only colors left standing in forced colors mode. They are keywords resolved by the browser, the operating system and the `color-scheme` of the element, so every value on this page is read back from the browser viewing it rather than written down. The first sections render inside the theme: the pairs and the colors without a pair, the same swatches and native controls under a light and a dark `color-scheme`, the elements of the theme beside the system color each would default to, and the deprecated CSS 2 colors beside the ones CSS Color 4 maps them to. The last frames a document served without the theme, so its controls are the browser's defaults, once with no `color-scheme`, once `dark` and once `light dark`.
Background and text pairs
Each swatch is painted with a background color and written in the text color paired with it, with a border of `ButtonBorder`. The value under each name is what this browser resolved the keyword to on this page. A name struck through is one this browser does not recognize: `AccentColor` and `AccentColorText` are the newest of them and are the usual gap. `mantra_starter` declares no `color-scheme`, so these are light values for a visitor -- but a stylesheet that comes along with the toolbar can declare one: the `elements.css` of the `default_admin` theme of core sets `color-scheme: dark` on `.dark-mode`, which it puts on the root element of every page a dark-mode administrator sees, and every value below then turns dark with it.
The color scheme used on the root of this page:
Canvas
CanvasText
Field
FieldText
ButtonFace
ButtonText
Highlight
HighlightText
SelectedItem
SelectedItemText
Mark
MarkText
AccentColor
AccentColorText
Colors without a pair
Text colors for links in each state and for disabled text, and the color of the border round a button. They are meant for use on `Canvas`, which is what every sample here is painted on.
LinkText
VisitedText
ActiveText
GrayText
ButtonBorder
Under each color scheme
System colors resolve against the `color-scheme` used on the element that is painted, not against the page or the operating system. Each panel sets one on itself and nothing else, so the swatches and the native controls inside it switch with it -- except where the theme has given a control colors of its own, which do not switch, and which is the thing to look for here.
color-scheme: light
A paragraph with a link, some highlighted text and disabled-looking text.
Canvas
CanvasText
Field
FieldText
ButtonFace
ButtonText
Highlight
HighlightText
SelectedItem
SelectedItemText
Mark
MarkText
AccentColor
AccentColorText
LinkText
VisitedText
ActiveText
GrayText
ButtonBorder
color-scheme: dark
A paragraph with a link, some highlighted text and disabled-looking text.
Canvas
CanvasText
Field
FieldText
ButtonFace
ButtonText
Highlight
HighlightText
SelectedItem
SelectedItemText
Mark
MarkText
AccentColor
AccentColorText
LinkText
VisitedText
ActiveText
GrayText
ButtonBorder
The theme beside the defaults
Each row is an element as `mantra_starter` styles it, beside a swatch of the system color the browser would have given the same property. Where the two values agree the theme left the default alone; where they differ the theme set a color of its own, and that color will not follow a dark color scheme or forced colors unless the theme says so.
| Property | In the theme | System color |
|---|---|---|
| Page background | body |
Canvas
|
| Page text | body |
CanvasText
|
| Link | A link |
LinkText
|
| Button background |
ButtonFace
|
|
| Button text |
ButtonText
|
|
| Button border |
ButtonBorder
|
|
| Text field background |
Field
|
|
| Text field text |
FieldText
|
|
| Highlighted text background | Highlighted |
Mark
|
| Highlighted text | Highlighted |
MarkText
|
Deprecated system colors
CSS 2 had a system color for every part of a Windows 95 window. CSS Color 4 keeps the keywords so old stylesheets still parse, and says each must resolve to the modern color beside it. A row marked as differing is a browser still answering from the operating system rather than from the mapping -- worth knowing before trusting `ThreeDFace` or `InfoBackground` in old CSS to look like anything in particular.
| Deprecated | Mapped to | Same value |
|---|---|---|
ActiveBorder
|
ButtonBorder
|
|
ActiveCaption
|
Canvas
|
|
AppWorkspace
|
Canvas
|
|
Background
|
Canvas
|
|
ButtonHighlight
|
ButtonFace
|
|
ButtonShadow
|
ButtonFace
|
|
CaptionText
|
CanvasText
|
|
InactiveBorder
|
ButtonBorder
|
|
InactiveCaption
|
Canvas
|
|
InactiveCaptionText
|
GrayText
|
|
InfoBackground
|
Canvas
|
|
InfoText
|
CanvasText
|
|
Menu
|
Canvas
|
|
MenuText
|
CanvasText
|
|
Scrollbar
|
Canvas
|
|
ThreeDDarkShadow
|
ButtonBorder
|
|
ThreeDFace
|
ButtonFace
|
|
ThreeDHighlight
|
ButtonBorder
|
|
ThreeDLightShadow
|
ButtonBorder
|
|
ThreeDShadow
|
ButtonBorder
|
|
Window
|
Canvas
|
|
WindowFrame
|
ButtonBorder
|
|
WindowText
|
CanvasText
|
Browser defaults
The frames below load a document served without the theme, without any library of the site and without a stylesheet beyond the few rules that lay the swatches out. Its headings, form controls, links and highlighted text are exactly what this browser draws by default, and the swatches are resolved inside it rather than inside this page. The first frame declares no color scheme, which a browser takes as light; the second declares `dark`; the third declares `light dark`, which hands the choice to the operating system, so it matches one of the other two depending on the preference set there.