Class KnownFilterMatrices
A collection of known ColorMatrix values for composing filters
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class KnownFilterMatrices
Properties
| Edit this page View SourceAchromatomalyFilter
Gets a filter recreating Achromatomaly (Color desensitivity) color blindness
Declaration
public static ColorMatrix AchromatomalyFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
AchromatopsiaFilter
Gets a filter recreating Achromatopsia (Monochrome) color blindness.
Declaration
public static ColorMatrix AchromatopsiaFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
BlackWhiteFilter
Gets an approximated black and white filter
Declaration
public static ColorMatrix BlackWhiteFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
DeuteranomalyFilter
Gets a filter recreating Deuteranomaly (Green-Weak) color blindness.
Declaration
public static ColorMatrix DeuteranomalyFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
DeuteranopiaFilter
Gets a filter recreating Deuteranopia (Green-Blind) color blindness.
Declaration
public static ColorMatrix DeuteranopiaFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
KodachromeFilter
Gets a filter recreating an old Kodachrome camera effect.
Declaration
public static ColorMatrix KodachromeFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
LomographFilter
Gets a filter recreating an old Lomograph camera effect.
Declaration
public static ColorMatrix LomographFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
PolaroidFilter
Gets a filter recreating an old Polaroid camera effect.
Declaration
public static ColorMatrix PolaroidFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
ProtanomalyFilter
Gets a filter recreating Protanomaly (Red-Weak) color blindness.
Declaration
public static ColorMatrix ProtanomalyFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
ProtanopiaFilter
Gets a filter recreating Protanopia (Red-Blind) color blindness.
Declaration
public static ColorMatrix ProtanopiaFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
TritanomalyFilter
Gets a filter recreating Tritanomaly (Blue-Weak) color blindness.
Declaration
public static ColorMatrix TritanomalyFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
TritanopiaFilter
Gets a filter recreating Tritanopia (Blue-Blind) color blindness.
Declaration
public static ColorMatrix TritanopiaFilter { get; }
Property Value
Type | Description |
---|---|
ColorMatrix |
Methods
| Edit this page View SourceCreateBrightnessFilter(float)
Create a brightness filter matrix using the given amount.
Declaration
public static ColorMatrix CreateBrightnessFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be greater than or equal to 0. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
Remarks
A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results.
CreateContrastFilter(float)
Create a contrast filter matrix using the given amount.
Declaration
public static ColorMatrix CreateContrastFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be greater than or equal to 0. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
Remarks
A value of 0 will create an image that is completely gray. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing results with more contrast.
CreateGrayscaleBt601Filter(float)
Create a grayscale filter matrix using the given amount using the formula as specified by ITU-R Recommendation BT.601. https://en.wikipedia.org/wiki/Luma_%28video%29#Rec._601_luma_versus_Rec._709_luma_coefficients
Declaration
public static ColorMatrix CreateGrayscaleBt601Filter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
CreateGrayscaleBt709Filter(float)
Create a grayscale filter matrix using the given amount using the formula as specified by ITU-R Recommendation BT.709. https://en.wikipedia.org/wiki/Rec._709#Luma_coefficients
Declaration
public static ColorMatrix CreateGrayscaleBt709Filter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
CreateHueFilter(float)
Create a hue filter matrix using the given angle in degrees.
Declaration
public static ColorMatrix CreateHueFilter(float degrees)
Parameters
Type | Name | Description |
---|---|---|
float | degrees | The angle of rotation in degrees. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
CreateInvertFilter(float)
Create an invert filter matrix using the given amount.
Declaration
public static ColorMatrix CreateInvertFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
CreateLightnessFilter(float)
Create a lightness filter matrix using the given amount.
Declaration
public static ColorMatrix CreateLightnessFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be greater than or equal to 0. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
Remarks
A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing lighter results.
CreateOpacityFilter(float)
Create an opacity filter matrix using the given amount.
Declaration
public static ColorMatrix CreateOpacityFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
CreateSaturateFilter(float)
Create a saturation filter matrix using the given amount.
Declaration
public static ColorMatrix CreateSaturateFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be greater than or equal to 0. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |
Remarks
A value of 0 is completely un-saturated. A value of 1 leaves the input unchanged. Other values are linear multipliers on the effect. Values of amount over 1 are allowed, providing super-saturated results
CreateSepiaFilter(float)
Create a sepia filter matrix using the given amount. The formula used matches the svg specification. http://www.w3.org/TR/filter-effects/#sepiaEquivalent
Declaration
public static ColorMatrix CreateSepiaFilter(float amount)
Parameters
Type | Name | Description |
---|---|---|
float | amount | The proportion of the conversion. Must be between 0 and 1. |
Returns
Type | Description |
---|---|
ColorMatrix | The ColorMatrix |