Vixen
dd8b0a81
csharp
public enum SystemColor

A CSS system colour: a name whose value the operating system owns rather than the sheet.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

CSS Color 4 § 6.1's list, minus the three deprecated groups. Every one of these is a role and not a colour — Canvas is "whatever this platform paints a page on" — which is what makes them the only spelling in CSS that can follow a light/dark switch, a high-contrast switch or an accent-colour change without a stylesheet saying anything.

⚠ The pairs travel together and reading one without the other is the mistake this enum's ordering is arranged to make hard. A background role is immediately followed by its text role — Canvas/CanvasText, ButtonFace/ButtonText, Field/FieldText, Highlight/HighlightText, Mark/MarkText, AccentColor/AccentColorText — because a forced palette guarantees contrast within a pair and guarantees nothing across two. Substituting Canvas behind ButtonText is how a high-contrast theme produces invisible text out of two colours the platform chose.

Fields and properties (15)

  • Canvas

    The background of application content.

  • CanvasText

    Text on Canvas.

  • LinkText

    Text of a hyperlink that has not been followed.

  • ButtonFace

    The face of a push button.

  • ButtonText

    Text on ButtonFace.

  • ButtonBorder

    The border of a push button.

  • Field

    The background of an input field.

  • FieldText

    Text in a Field.

  • Highlight

    The background of selected text.

  • HighlightText

    Text on Highlight.

  • GrayText

    Text of a control that is disabled.

  • Mark

    The background of marked or found text.

  • MarkText

    Text on Mark.

  • AccentColor

    The user's chosen accent colour.

  • AccentColorText

    Text on AccentColor.

Used by (7)

  • DrawListBuilderVixen.Ui
  • ForcedColorsTestsVixen.Ui.Tests
  • PlatformInputVixen.Platform.Ui
  • StyleValueParserVixen.Ui.Styling
  • SystemPaletteVixen.Ui.Styling
  • SystemPaletteWiringTestsVixen.Platform.Ui.Tests
  • ThemeAccentTokenTestsVixen.Ui.Controls.Tests