Table of Contents

Enum CompositeMode

Namespace
SixLabors.Fonts.Rendering
Assembly
SixLabors.Fonts.dll

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 = 0

Clears both the source and destination. The output is fully transparent regardless of the input colors.

Color = 26

Combines the hue and saturation of the source with the luminosity of the destination.

ColorBurn = 18

Darkens the destination to reflect the source. Formula: 1 − (1 − D) / S.

ColorDodge = 17

Brightens the destination to reflect the source. Formula: D / (1 − S).

Darken = 15

Chooses the darker of source and destination values per color channel.

Dest = 2

Keeps the destination as-is and ignores the source. Equivalent to no drawing operation.

DestAtop = 10

Draws the destination over the source but only within the source’s alpha region. Outside that region, the source is visible.

DestIn = 6

Shows the destination only where it overlaps the source. The source’s alpha acts as a mask for the destination.

DestOut = 8

Shows the destination only where it does not overlap the source. Produces the inverse of DestIn.

DestOver = 4

Draws the destination over the source. The destination appears on top and the source shows through transparent areas.

Difference = 21

Subtracts darker colors from lighter ones to highlight differences. Often used for comparison or edge detection effects.

Exclusion = 22

Similar to Difference, but with reduced contrast. Midtones are preserved, producing a lower-contrast difference.

HardLight = 19

Applies overlay logic using the source’s lightness. Used for strong highlight and shadow effects.

Hue = 24

Combines the hue of the source with the saturation and luminosity of the destination.

Lighten = 16

Chooses the lighter of source and destination values per color channel.

Luminosity = 27

Combines the luminosity of the source with the hue and saturation of the destination.

Multiply = 23

Multiplies source and destination colors. Always results in a darker composite.

Overlay = 14

Multiplies or screens colors depending on destination lightness. Preserves highlights and shadows while mixing source and destination tones.

Plus = 12

Adds the source and destination color values. Alpha is also added, producing a brightening effect.

Saturation = 25

Combines the saturation of the source with the hue and luminosity of the destination.

Screen = 13

Combines colors using an inverse multiply. Formula: 1 − (1 − S) × (1 − D). Produces a lighter result similar to photographic screen exposure.

SoftLight = 20

Similar to HardLight, but with reduced contrast. Produces a softer transition between tones.

Src = 1

Replaces the destination entirely with the source. The destination pixels are ignored.

SrcAtop = 9

Draws the source over the destination but only within the destination’s alpha region. Outside that region, the destination remains unchanged.

SrcIn = 5

Shows the source only where it overlaps the destination. The destination’s alpha acts as a mask for the source.

SrcOut = 7

Shows the source only where it does not overlap the destination. Produces the inverse of SrcIn.

SrcOver = 3

Draws the source over the destination using standard alpha compositing. The source appears on top and the destination shows through transparent areas.

Xor = 11

Exclusive OR. Shows the source and destination only where they do not overlap. Overlapping regions become transparent.