CSS saturate() function
- Previous Page CSS round() function
- Next Page CSS scale() function
- Go to the Previous Level CSS Function Reference Manual
Definition and usage
CSS saturate()
Filter functions are used to adjust the saturation (color intensity) of elements.
- 0% (or 0) will make the element completely desaturated
- 100% (or 1) will have no effect
- 200% (or 2) will make the element oversaturated
Instance
Example 1
Set different saturation levels for images:
#img1 { filter: saturate(0); } #img2 { filter: saturate(100%); } #img3 { filter: saturate(200%); }
Example 2
to saturate()
with backdrop-filter
Combined use of properties:
div.transbox { background-color: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: saturate(450%); backdrop-filter: saturate(450%); padding: 20px; margin: 30px; font-weight: bold; }
CSS syntax
saturate(amount)
Value | Description |
---|---|
amount |
Optional. Specify the saturation value, which can be a number or a percentage. 0% (or 0) will make the element completely desaturated. 100% (or 1) represents no effect. Values over 100% will provide an oversaturated effect. |
Technical details
Version: | CSS Filter Effects Module Level 1 |
---|
Browser support
The numbers in the table represent the first browser version to fully support this function.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
18 | 12 | 35 | 6 | 15 |
Related pages
Reference:CSS filter attribute
Reference:CSS blur() function
Reference:CSS brightness() function
Reference:CSS contrast() function
Reference:CSS drop-shadow() function
Reference:CSS grayscale() function
Reference:CSS hue-rotate() function
Reference:CSS invert() function
Reference:CSS opacity() function
Reference:CSS sepia() function
- Previous Page CSS round() function
- Next Page CSS scale() function
- Go to the Previous Level CSS Function Reference Manual