Class ColorSorter
Methods for sorting colors.
Namespace: Artemis.Core.ColorScience
Assembly: Artemis.Core.dll
Syntax
public static class ColorSorter
Methods
GetColorDifference(in SKColor, in SKColor)
Gets the Cie94 difference between two colors.
Declaration
public static float GetColorDifference(in SKColor color1, in SKColor color2)
Parameters
Type | Name | Description |
---|---|---|
SKColor | color1 | |
SKColor | color2 |
Returns
Type | Description |
---|---|
float |
Sort(in Span<SKColor>, SKColor)
Sorts the given colors in place, starting by the closest to the reference color.
Declaration
public static void Sort(in Span<SKColor> colors, SKColor startColor = default)
Parameters
Type | Name | Description |
---|---|---|
Span<SKColor> | colors | The span of colors to sort. |
SKColor | startColor | The reference color to sort from. |