Edit

ColorExtensions Class

Definition

Provides extension methods for converting between SkiaSharp and HarfBuzz color types.

public static class ColorExtensions
Inheritance
ColorExtensions

Examples

Converting an SKColor to an HBColor and back:

SKColor skColor = SKColors.CornflowerBlue;
HBColor hbColor = skColor.ToHBColor();
SKColor restored = hbColor.ToSKColor();

Remarks

ColorExtensions provides convenient extension methods for converting between <xref:SkiaSharp.SKColor>, <xref:SkiaSharp.SKColorF>, and <xref:HarfBuzzSharp.HBColor>.

Methods

Name Description
ToHBColor(SKColor)

Converts an SKColor to an HBColor.

ToHBColor(SKColorF)

Converts an SKColorF to an HBColor.

ToSKColor(HBColor)

Converts an HBColor to an SKColor.

ToSKColorF(HBColor)

Converts an HBColor to an SKColorF.

ToSKColors(HBColor[])

Converts an array of HBColor values to an array of SKColor values.

Applies to