CSS sepia() function
- Previous Page CSS scaleY() function
- Next Page CSS sin() function
- Go to the Previous Level CSS Function Reference Manual
Definition and usage
CSS sepia()
The filter function converts the image to sepia (a warmer, more brown/yellow color).
- 100% (or 1) makes the image completely brown
- 0% (or 0) has no effect
Instance
Example 1
Set different sepia effects for images:
#img1 { filter: sepia(1); } #img2 { filter: sepia(60%); } #img3 { filter: sepia(0.4); }
Example 2
to sepia()
with backdrop-filter
Use attributes together:
div.transbox { background-color: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: sepia(100%); backdrop-filter: sepia(100%); padding: 20px; margin: 30px; font-weight: bold; }
CSS syntax
sepia(amount)
Value | Description |
---|---|
amount |
Optional. Specify the brown value, which can be a number or a percentage. 100% (or 1) makes the element completely brown. 0% (or 0) represents the original image (no effect). The default value is 0. |
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 property
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 saturate() function
- Previous Page CSS scaleY() function
- Next Page CSS sin() function
- Go to the Previous Level CSS Function Reference Manual