This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Indicates how bright the screen's backlight is, on a scale from 0 (very dim) to 1 (full brightness); this value is a double-precision float.

You can read and write this attribute even when the screen is disabled, but the backlight is off while the screen is disabled. If you write a value of X into this attribute, the attribute may not have the same value X when you later read it. Most screens don't support as many different brightness levels as there are doubles between 0 and 1. The value's precision might be reduced before storing it.


screenBrightness = window.screen.mozBrightness;

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? 12.0 (12.0)[1] ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? 12.0 (12.0)[1] ? ? ?

[1] In order to use screen.mozBrightness you have to set the preference dom.screenBrightnessProperty.enabled to true in about:config.


Not part of specification.

Document Tags and Contributors

Contributors to this page: cvrebert, Sebastianz, teoli, MHasan, kscarfone, namolmes, Sheppy, jswisher, fscholz
Last updated by: cvrebert,