Table of Contents

Class LightDarkColor

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Extends Color with additional features. Implements light and dark color pair, one of them is used when argb of the LightDarkColor is requested. Returned argb depends on the value specified in IsDarkOverride and a result of IsUsingDarkBackground.

public class LightDarkColor : Color, IEquatable<Color>, IEquatable<LightDarkColor>
Inheritance
LightDarkColor
Implements

Constructors

LightDarkColor(Color)

Initializes a new instance of the LightDarkColor class with the same light and dark colors.

LightDarkColor(Color, Color)

Initializes a new instance of the LightDarkColor class with the specified light and dark color values.

LightDarkColor(KnownSvgColor)

Initializes a new instance of the LightDarkColor class with the light and dark colors assigned from KnownSvgColor.

Fields

IsDarkOverride

Gets or sets whether dark or light color is returned when argb of the color is requested. When this is null (default), AppearanceIsDark is used in order to determine which argb to return.

Properties

Dark

Gets dark color.

DebugString

Gets color value as text the debug purposes.

IsUsingDarkColor

Gets whether dark or light color is returned.

Light

Gets light color.

Methods

DoInsideTempIsDarkOverride(bool?, Action?)

Calls the specified action inside the block which temporary changes value of the IsDarkOverride property.

Equals(LightDarkColor?)

Indicates whether the current object is equal to another object of the same type.

Equals(object?)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

LightOrDark(bool)

Gets Dark or Light color depending on isDark parameter value.

RequireArgb(ref ColorStruct)

This method is called each time before argb value of the color is returned to the caller.

Operators

operator ==(LightDarkColor?, LightDarkColor?)

Tests whether two specified LightDarkColor structures are equivalent.

operator !=(LightDarkColor?, LightDarkColor?)

Tests whether two specified LightDarkColor structures are different.