Class ColorPickerHelper
Represents a helping class for the Syncfusion.UI.Xaml.Controls.SfColorPicker control.
Inheritance
System.Object
ColorPickerHelper
Namespace: Syncfusion.Windows.Controls
Assembly: Syncfusion.SfShared.Wpf.dll
Syntax
public static class ColorPickerHelper : Object
Methods
FromHsl(Double, Double, Double, Double)
Returns the A, RGB values
Declaration
public static Color FromHsl(double hue, double saturation, double lightness, double alpha = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Double | hue | hue value |
System.Double | saturation | saturation value |
System.Double | lightness | lightness value |
System.Double | alpha | alpha value |
Returns
Type | Description |
---|---|
System.Windows.Media.Color | returns color from HSL value |
FromHsv(Double, Double, Double, Double)
Gets the ARGB values from HSV
Declaration
public static Color FromHsv(double hue, double saturation, double value, double alpha = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Double | hue | hue value |
System.Double | saturation | saturation value |
System.Double | value | Indicates value from HSV |
System.Double | alpha | alpha value |
Returns
Type | Description |
---|---|
System.Windows.Media.Color | returns color from HSV value |
GetCanvasPosition(HsvColor, Double, Double)
Gets the canvas position
Declaration
public static Point GetCanvasPosition(this HsvColor hsv, double ph, double pw)
Parameters
Type | Name | Description |
---|---|---|
HsvColor | hsv | HSV color |
System.Double | ph | PH value |
System.Double | pw | pw value |
Returns
Type | Description |
---|---|
System.Windows.Point | canvas position as point |
IntColorFromBytes(Byte, Byte, Byte, Byte)
Gets the color from the input bytes
Declaration
public static int IntColorFromBytes(byte a, byte r, byte g, byte b)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | a | a value |
System.Byte | r | red value |
System.Byte | g | green value |
System.Byte | b | blue value |
Returns
Type | Description |
---|---|
System.Int32 | integer value from bytes |
UpdateColorValue(Double, Double, Double, Double, Double, Double)
Update all the color values
Declaration
public static Color UpdateColorValue(double hue, double x, double y, double ph, double pw, double invPh)
Parameters
Type | Name | Description |
---|---|---|
System.Double | hue | hue value |
System.Double | x | x value |
System.Double | y | y value |
System.Double | ph | PH value |
System.Double | pw | pw value |
System.Double | invPh | Invariant PH |
Returns
Type | Description |
---|---|
System.Windows.Media.Color | returns updated color value |