ColorObject.Luminance Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Luminance() |
Returns the relative luminance of this color. |
Luminance(Color) |
Returns the relative luminance of a color. |
Luminance(Int64) |
Returns the relative luminance of a color. |
Luminance()
Returns the relative luminance of this color.
[Android.Runtime.Register("luminance", "()F", "GetLuminanceHandler", ApiSince=26)]
public virtual float Luminance ();
[<Android.Runtime.Register("luminance", "()F", "GetLuminanceHandler", ApiSince=26)>]
abstract member Luminance : unit -> single
override this.Luminance : unit -> single
Returns
A value between 0 (darkest black) and 1 (lightest white)
- Attributes
Remarks
Returns the relative luminance of this color.
Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.
Java documentation for android.graphics.Color.luminance()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Luminance(Color)
Returns the relative luminance of a color.
[Android.Runtime.Register("luminance", "(I)F", "", ApiSince=24)]
public static float Luminance (Android.Graphics.Color color);
[<Android.Runtime.Register("luminance", "(I)F", "", ApiSince=24)>]
static member Luminance : Android.Graphics.Color -> single
Parameters
- color
- Color
Returns
a value between 0 (darkest black) and 1 (lightest white)
- Attributes
Remarks
Returns the relative luminance of a color.
Assumes sRGB encoding. Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.
Java documentation for android.graphics.Color.luminance(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Luminance(Int64)
Returns the relative luminance of a color.
[Android.Runtime.Register("luminance", "(J)F", "", ApiSince=26)]
public static float Luminance (long color);
[<Android.Runtime.Register("luminance", "(J)F", "", ApiSince=26)>]
static member Luminance : int64 -> single
Parameters
- color
- Int64
Returns
A value between 0 (darkest black) and 1 (lightest white)
- Attributes
Remarks
Returns the relative luminance of a color.
Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.
Java documentation for android.graphics.Color.luminance(long)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.