Skip to content

ColorExtensions class

Defined in

Namespace: CrissCross.Avalonia.UI.Extensions Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.Extensions.ColorExtensions Modifiers: public static

Summary

Adds an extension for Color that allows manipulation with HSL and HSV color spaces.

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Methods

NameSummary
static ToBrushCreates a SolidColorBrush from a Color.
static GetLuminanceGets Color luminance based on HSL space.
static GetBrightnessGets Color brightness based on HSV space.
static GetHueGets Color hue based on HSV space.
static GetSaturationGets Color saturation based on HSV space.
static UpdateLuminanceAllows to change the luminance by a factor based on the HSL color space.
static UpdateSaturationAllows to change the saturation by a factor based on the HSL color space.
static UpdateBrightnessAllows to change the brightness by a factor based on the HSV color space.
static FromHexConverts a hex string to a Color.
static ToHexConverts a Color to a hex string.
static ToHexWithoutAlphaConverts a Color to a hex string without alpha.
Inherited members