Enum CompositeMode
Defines compositing and blending operations used when combining source and destination colors.
Values 0–12 correspond to standard Porter–Duff compositing modes. These determine how source and destination alpha interact to produce transparency. The remaining values (13–27) correspond to separable and non-separable blend modes used in modern graphics systems such as ImageSharp.
public enum CompositeMode
Fields
Clear = 0Clears both the source and destination. The output is fully transparent regardless of the input colors.
Color = 26Combines the hue and saturation of the source with the luminosity of the destination.
ColorBurn = 18Darkens the destination to reflect the source. Formula:
1 − (1 − D) / S.ColorDodge = 17Brightens the destination to reflect the source. Formula:
D / (1 − S).Darken = 15Chooses the darker of source and destination values per color channel.
Dest = 2Keeps the destination as-is and ignores the source. Equivalent to no drawing operation.
DestAtop = 10Draws the destination over the source but only within the source’s alpha region. Outside that region, the source is visible.
DestIn = 6Shows the destination only where it overlaps the source. The source’s alpha acts as a mask for the destination.
DestOut = 8Shows the destination only where it does not overlap the source. Produces the inverse of DestIn.
DestOver = 4Draws the destination over the source. The destination appears on top and the source shows through transparent areas.
Difference = 21Subtracts darker colors from lighter ones to highlight differences. Often used for comparison or edge detection effects.
Exclusion = 22Similar to Difference, but with reduced contrast. Midtones are preserved, producing a lower-contrast difference.
HardLight = 19Applies overlay logic using the source’s lightness. Used for strong highlight and shadow effects.
Hue = 24Combines the hue of the source with the saturation and luminosity of the destination.
Lighten = 16Chooses the lighter of source and destination values per color channel.
Luminosity = 27Combines the luminosity of the source with the hue and saturation of the destination.
Multiply = 23Multiplies source and destination colors. Always results in a darker composite.
Overlay = 14Multiplies or screens colors depending on destination lightness. Preserves highlights and shadows while mixing source and destination tones.
Plus = 12Adds the source and destination color values. Alpha is also added, producing a brightening effect.
Saturation = 25Combines the saturation of the source with the hue and luminosity of the destination.
Screen = 13Combines colors using an inverse multiply. Formula:
1 − (1 − S) × (1 − D). Produces a lighter result similar to photographic screen exposure.SoftLight = 20Similar to HardLight, but with reduced contrast. Produces a softer transition between tones.
Src = 1Replaces the destination entirely with the source. The destination pixels are ignored.
SrcAtop = 9Draws the source over the destination but only within the destination’s alpha region. Outside that region, the destination remains unchanged.
SrcIn = 5Shows the source only where it overlaps the destination. The destination’s alpha acts as a mask for the source.
SrcOut = 7Shows the source only where it does not overlap the destination. Produces the inverse of SrcIn.
SrcOver = 3Draws the source over the destination using standard alpha compositing. The source appears on top and the destination shows through transparent areas.
Xor = 11Exclusive OR. Shows the source and destination only where they do not overlap. Overlapping regions become transparent.