ColorExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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) | |
| ToHBColor(SKColorF) | |
| ToSKColor(HBColor) | |
| ToSKColorF(HBColor) | |
| ToSKColors(HBColor[]) |
Converts an array of HBColor values to an array of SKColor values. |