Available blend modes
Normal
Default alpha compositing. The source layer is placed on top of the destination using its alpha channel.Multiply
Multiplies the base and blend colors, resulting in a darker image. Multiplying any color with black produces black; multiplying with white leaves the color unchanged.Screen
Multiplies the inverse of the base and blend colors, resulting in a lighter image. Screening with black leaves the color unchanged; screening with white produces white.Overlay
Multiplies or screens the colors depending on the base color. Preserves highlights and shadows while adding contrast.Darken
Selects the darker of the base or blend color for each channel.Lighten
Selects the lighter of the base or blend color for each channel.ColorDodge
Brightens the base color to reflect the blend color by decreasing contrast.ColorBurn
Darkens the base color to reflect the blend color by increasing contrast.HardLight
Multiplies or screens the colors depending on the blend color. Creates a harsh lighting effect.SoftLight
Darkens or lightens the colors depending on the blend color. Creates a softer lighting effect than HardLight.Difference
Subtracts the blend color from the base color or vice versa, depending on which has the greater brightness value. Blending with white inverts the base color; blending with black produces no change.Exclusion
Creates an effect similar to Difference mode but with lower contrast.Hue
Creates a result color with the luminance and saturation of the base color and the hue of the blend color.Saturation
Creates a result color with the luminance and hue of the base color and the saturation of the blend color.Color
Creates a result color with the luminance of the base color and the hue and saturation of the blend color. Useful for coloring grayscale images.Luminosity
Creates a result color with the hue and saturation of the base color and the luminance of the blend color. The inverse of Color mode.Complete blend mode list
All blend modes are implemented using floating-point math on the [0, 1] range:normal(default)multiplyscreenoverlaydarkenlightencolor-dodgecolor-burnhard-lightsoft-lightdifferenceexclusionhuesaturationcolorluminosity
Example usage
Blend mode internals
Blend modes are case-insensitive and accept multiple formats:~/workspace/source/crates/kimg-core/src/blend.rs:14-51 for the full blend mode implementation.