Brightness() - Function CSS
Summary of characteristics of the brightness()
function
100%
does not produce a change in brightness.Description of the brightness()
function..
The brightness()
function allows you to adjust the brightness of an element.
It is most often used on an image, but can work on any type of element.
brightness()
applies a multiplier to each pixel. The effect will therefore be zero on black, which already correspond to the value 0.
The brightness() function can be used with:
backdrop-filter
: Applies a graphical filter to the clip behind the targeted clip.filter
: Applies a graphic filter (blur, contrast, brightness, etc.) to an element.
Syntaxes of the brightness()
function.
- filter: brightness(50%); n
n
indicates the importance of the change in brightness. This can be an increase or decrease in brightness.It is a unitless numerical value, or a percentage.
0
indicates a total reduction in brightness (a black image).- A value between
0
and1
, or a percentage between0%
and100%
, indicates a more or less important reduction of luminosity. 1
or100%
does not cause any change in brightness.- A value greater than
1
, or a percentage greater than100%,
corresponds to an increase in brightness. - The default, when the parentheses are empty, is
100%
. - Negative values are not allowed.
If no value is specified, the default value is
1
, so the brightness of the element is not changed.
Simulator: brightness()
used with filter
.
Brightness() effect on black text

Simulator : brightness()
used with backdrop-filter
.
When a text is on a confusing background, reading is laborious. The brightness()
function used with backdrop-filter
can greatly improve
readability by darkening the background if, as in our example, the text is in light color.

brightness()
to improve text readability
Browsers compatibility with brightness()
function.
Graphic filters have long been well rendered by browsers.
The brightness()
function, which is one of these filters, is itself well recognized by current browsers.
filter
.brightness()
function to modify the brightness of text or an image.filters
brightness()
function
Browsers on computers :
Mobile browsers :
Outdated or marginal browsers :

Internet Explorer

QQ Browser

Safari sur IOS

Firefox pour Androïd

Opéra Mobile

Baidu Browser

KaiOS Browser

UC Browser pour Androïd

Samsung Internet

Opéra

Safari

Firefox

Chrome pour Androïd

Chrome

Edge

Androïd Brower

Opéra mini
Historic of the brightness()
function.
-
Filter Effects Module Level 1
First version of the specification module defining graphic filters. Thebrightness()
function is described in this module.October 25, 2012Working Draft.
See also: other graphic effects.
The following is a list of the properties and functions described in the Filter Effects Module specification.
Properties:


linearRGB
.



Functions:






