Description
The FilterSepia
property in the BaseStyles
class represents the filter-sepia
CSS property. This property is used to apply a sepia filter effect to an element, which gives it a warm, brownish tone reminiscent of old photographs. The value is a Nullable<Length>
, allowing you to specify the intensity of the sepia effect.
Usage
To use the FilterSepia
property, assign it a Length
value that represents the percentage of the sepia effect you want to apply. A value of 0%
means no sepia effect, while 100%
applies the full sepia effect. You can also set it to null
to remove the sepia filter.
Example
// Example of setting the FilterSepia property
var styles = new BaseStyles();
styles.FilterSepia = new Length(50, LengthUnit.Percent); // Apply 50% sepia effect
// To remove the sepia effect
styles.FilterSepia = null;