---
title: "luminance"
description: "Returns the relative luminance of this color.

Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11
December 2008."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
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.

#### Returns

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




