Class ColorExtension
Represents an extension class that provides the methods to convert the color values into different types such as System.Int32, Pixel and HsvColor.
Inheritance
System.Object
ColorExtension
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Windows.Controls
Assembly: Syncfusion.SfShared.Wpf.dll
Syntax
public static class ColorExtension
Methods
AsInt(Color)
Gets the color as an integer
Declaration
public static int AsInt(this Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Color | color | color value |
Returns
Type | Description |
---|---|
System.Int32 | returns color as an integer |
GetPixel(Color)
Gets pixel value from the color
Declaration
public static Pixel GetPixel(this Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Color | color | color value |
Returns
Type | Description |
---|---|
Pixel | returns pixel value from the color |
ToHsv(Color)
Converts the RGBA color to HSV
Declaration
public static HsvColor ToHsv(this Color rgba)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Color | rgba | color value |
Returns
Type | Description |
---|---|
HsvColor | returns HSV color from RGB color |