Skip to main content

PlatformColorValues Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Information about current system color values, including information about dark mode and accent colors.

public class PlatformColorValues

Inheritance: object -> PlatformColorValues

Implements: IEquatable<PlatformColorValues>

Constructors​

NameDescription
PlatformColorValuesNo summary available.

PlatformColorValues Constructor​

public PlatformColorValues()

Methods​

NameDescription
<Clone>$No summary available.
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringNo summary available.

<Clone>$ Method​

public Avalonia.Platform.PlatformColorValues <Clone>$()

Returns​

Avalonia.Platform.PlatformColorValues

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Platform.PlatformColorValues other)
Parameters​

other Avalonia.Platform.PlatformColorValues

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

ToString Method​

public string ToString()

Returns​

string

Properties​

NameDescription
AccentColor1Primary system accent color.
AccentColor2Secondary system accent color. On some platforms can return the same value as Avalonia.Platform.PlatformColorValues.AccentColor1.
AccentColor3Tertiary system accent color. On some platforms can return the same value as Avalonia.Platform.PlatformColorValues.AccentColor1.
ContrastPreferenceSystem high contrast preference.
ThemeVariantSystem theme variant or mode.

AccentColor1 Property​

Primary system accent color.

public Avalonia.Media.Color AccentColor1 { get; set; }

AccentColor2 Property​

Secondary system accent color. On some platforms can return the same value as Avalonia.Platform.PlatformColorValues.AccentColor1.

public Avalonia.Media.Color AccentColor2 { get; set; }

AccentColor3 Property​

Tertiary system accent color. On some platforms can return the same value as Avalonia.Platform.PlatformColorValues.AccentColor1.

public Avalonia.Media.Color AccentColor3 { get; set; }

ContrastPreference Property​

System high contrast preference.

public Avalonia.Platform.ColorContrastPreference ContrastPreference { get; set; }

ThemeVariant Property​

System theme variant or mode.

public Avalonia.Platform.PlatformThemeVariant ThemeVariant { get; set; }