Skip to main content

ToHsl(Byte, Byte, Byte, Byte) Method

Converts the given RGBA color component values to their HSL color equivalent.

Definition​

Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public static HslColor ToHsl(
byte red,
byte green,
byte blue,
byte alpha = 255
)

Parameters​

  Byte
The Red component in the RGB color model.
  Byte
The Green component in the RGB color model.
  Byte
The Blue component in the RGB color model.
  Byte  (Optional)
The Alpha component.

Return Value​

HslColor
A new HslColor equivalent to the given RGBA values.

See Also​

Reference​

Color Structure
ToHsl Overload
Avalonia.Media Namespace