Skip to main content

GetAccent Method

This does not account for perceptual differences and also does not match with system accent color calculation.

Definition

Namespace: Avalonia.Controls.Primitives.Converters
Assembly: Avalonia.Controls.ColorPicker (in Avalonia.Controls.ColorPicker.dll)

public static HsvColor GetAccent(
HsvColor hsvColor,
int accentStep
)

Parameters

  HsvColor
The base color to calculate the accent from.
  Int32
The number of accent color steps to move.

Return Value

HsvColor
The new accent color.

Remarks

Use the HSV representation as it's more perceptual. In most cases only the value is changed by a fixed percentage so the algorithm is reproducible.

See Also

Reference

AccentColorConverter Class
Avalonia.Controls.Primitives.Converters Namespace