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¶
| Name | Summary |
|---|---|
| static ToBrush | Creates a SolidColorBrush from a Color. |
| static GetLuminance | Gets Color luminance based on HSL space. |
| static GetBrightness | Gets Color brightness based on HSV space. |
| static GetHue | Gets Color hue based on HSV space. |
| static GetSaturation | Gets Color saturation based on HSV space. |
| static UpdateLuminance | Allows to change the luminance by a factor based on the HSL color space. |
| static UpdateSaturation | Allows to change the saturation by a factor based on the HSL color space. |
| static UpdateBrightness | Allows to change the brightness by a factor based on the HSV color space. |
| static FromHex | Converts a hex string to a Color. |
| static ToHex | Converts a Color to a hex string. |
| static ToHexWithoutAlpha | Converts a Color to a hex string without alpha. |