ColorExtensionsGetBrightnessF(Color64) Method
Gets the brightness of a
Color64 instance as a
float value 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: 9.0.0
public static float GetBrightnessF(
this Color64 c
)
<ExtensionAttribute>
Public Shared Function GetBrightnessF (
c As Color64
) As Single
public:
[ExtensionAttribute]
static float GetBrightnessF(
Color64 c
)
[<ExtensionAttribute>]
static member GetBrightnessF :
c : Color64 -> float32
- c Color64
- The Color64 instance to get the brightness of.
SingleA
float value where 0 represents the darkest and 1 represents the brightest possible value.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).
This method always returns a gamma corrected result.
To get the brightness in the linear color space use the
GetBrightness(ColorF) method instead.