ColorExtensionsGetBrightness(Color32) Method
Gets the brightness of a
Color32 instance as a
byte based on human perception.
The
A component of the specified value is ignored.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.1.0
public static byte GetBrightness(
this Color32 c
)
<ExtensionAttribute>
Public Shared Function GetBrightness (
c As Color32
) As Byte
public:
[ExtensionAttribute]
static unsigned char GetBrightness(
Color32 c
)
[<ExtensionAttribute>]
static member GetBrightness :
c : Color32 -> byte
- c Color32
- The Color32 instance to get the brightness of.
ByteA
byte value where 0 represents the darkest and 255 represents the brightest possible value.In Visual Basic and C#, you can call this method as an instance method on any object of type
Color32. 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).