ColorExtensionsToGray(Color64, WorkingColorSpace) Method
Converts the specified color to a grayscale color using the specified colorSpace.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.2
public static Color64 ToGray(
this Color64 c,
WorkingColorSpace colorSpace
)
<ExtensionAttribute>
Public Shared Function ToGray (
c As Color64,
colorSpace As WorkingColorSpace
) As Color64
public:
[ExtensionAttribute]
static Color64 ToGray(
Color64 c,
WorkingColorSpace colorSpace
)
[<ExtensionAttribute>]
static member ToGray :
c : Color64 *
colorSpace : WorkingColorSpace -> Color64
- c Color64
- The color to convert to grayscale.
- colorSpace WorkingColorSpace
- The working color space to be used to determine the shade of the result. If Default, then this overload uses the sRGB color space.
For performance reasons this method does not validate this parameter. For undefined values the sRGB color space will be used as well.
Color64A
Color32 instance representing the grayscale version of the input color.In Visual Basic and C#, you can call this method as an instance method on any object of type
Color64. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).