core-ktx / androidx.graphics / kotlin.Int / luminance

luminance

inline val Int.luminance: Float

Returns the relative luminance of a color int, assuming sRGB encoding. Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.