Table of Contents

Class PlatformColorValues

Namespace
Avalonia.Platform
Assembly
Avalonia.Base.dll

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

public record PlatformColorValues : IEquatable<PlatformColorValues>
Inheritance
PlatformColorValues
Implements
Inherited Members

Constructors

PlatformColorValues()

public PlatformColorValues()

PlatformColorValues(PlatformColorValues)

protected PlatformColorValues(PlatformColorValues original)

Parameters

original PlatformColorValues

Properties

AccentColor1

Primary system accent color.

public Color AccentColor1 { get; init; }

Property Value

Color

AccentColor2

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

public Color AccentColor2 { get; init; }

Property Value

Color

AccentColor3

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

public Color AccentColor3 { get; init; }

Property Value

Color

ContrastPreference

System high contrast preference.

public ColorContrastPreference ContrastPreference { get; init; }

Property Value

ColorContrastPreference

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

ThemeVariant

System theme variant or mode.

public PlatformThemeVariant ThemeVariant { get; init; }

Property Value

PlatformThemeVariant

Methods

Equals(PlatformColorValues?)

public virtual bool Equals(PlatformColorValues? other)

Parameters

other PlatformColorValues

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(PlatformColorValues?, PlatformColorValues?)

public static bool operator ==(PlatformColorValues? left, PlatformColorValues? right)

Parameters

left PlatformColorValues
right PlatformColorValues

Returns

bool

operator !=(PlatformColorValues?, PlatformColorValues?)

public static bool operator !=(PlatformColorValues? left, PlatformColorValues? right)

Parameters

left PlatformColorValues
right PlatformColorValues

Returns

bool