Skip to main content

FilterOptions

filter adjusts visual appearance before the element is composed.

interface FilterOptions {
brightness?: number;
contrast?: number;
saturate?: number;
"hue-rotate"?: string;
blur?: string;
invert?: boolean;
colorTint?: string;
}
PropertyRange/formatNotes
brightness-100 to 100Lower or raise brightness.
contrast-100 to 100Lower or raise contrast.
saturate-100 to 100Lower or raise saturation.
hue-rotatedegree stringExample: "30".
blur0 to 100Larger values blur more.
invertbooleanInverts colors when true.
colorTinthex colorExample: "#ff6b35".

Example

{
"filter": {
"brightness": -10,
"hue-rotate": "30",
"blur": "2"
}
}

Used By