🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

luminance

Returns the relative luminance of this color.

luminance

Source set: Common
public fun Color.luminance(): Float

Returns the relative luminance of this color.

Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.

Return

A value between 0 (darkest black) and 1 (lightest white)

Throws: IllegalArgumentException

If the this color's color space does not use the RGB color model