---
title: 'SkBlendMode Overview'
linkTitle: 'SkBlendMode Overview'
weight: 260
---
Describes how destination pixel is replaced
with a combination of itself and source pixel.
Blend_Mode may use source, destination, or both.
Blend_Mode may operate on each
Color component
independently, or may allow all source pixel
components to contribute to one destination
pixel component.
Blend_Mode does not use adjacent pixels to determine
the outcome.
Blend_Mode uses source and read destination
Alpha
to determine written destination
Alpha;
both source and destination
Alpha
may also affect written destination
Color components.
Regardless of how
Alpha
is encoded in source and destination pixel,
nearly all Color_Types treat it as ranging
from zero to one. And, nearly all Blend_Mode
algorithms limit the output so that all results are also zero to one.
Two exceptions are
SkBlendMode::kPlus
and
kRGBA_F16_SkColorType.
SkBlendMode::kPlus
permits computing
Alpha
and Color component values
larger than one. For Color_Types other than
kRGBA_F16_SkColorType,
resulting
Alpha
and component values are clamped to one.
kRGBA_F16_SkColorType
permits values outside the zero to one range. It is up to the client to ensure
that the result is within the range of zero to one, and therefore well-defined.
Compositing
Digital Images describes
Porter_Duff modes
SkBlendMode::kClear
through
SkBlendMode::kXor.
Drawing a bitmap with
transparency using Porter_Duff
compositing is free to clear the destination.
![Porter_Duff](https://fiddle.skia.org/i/819903e0bb125385269948474b6c8a84_raster.png)
Draw geometry with transparency using
Porter_Duff compositing does not
combine transparent source pixels, leaving the destination outside the geometry
untouched.
![Porter_Duff](https://fiddle.skia.org/i/8f320c1e94e77046e00f7e9e843caa27_raster.png)
Modes
SkBlendMode::kPlus
and
SkBlendMode::kScreen
use simple arithmetic to lighten or darken the destination. Modes
SkBlendMode::kOverlay
through
SkBlendMode::kMultiply
use more complicated algorithms to lighten or darken; sometimes one mode does
both, as described by Blend
Modes .
![Lighten_Darken](https://fiddle.skia.org/i/23a33fa04cdd0204b2490d05e340f87c_raster.png)
SkBlendMode::kModulate
is a mashup of
SkBlendMode::kSrcATop
and
SkBlendMode::kMultiply.
It multiplies all components, including
Alpha;
unlike
SkBlendMode::kMultiply,
if either source or destination is transparent, result is transparent.
SkBlendMode::kModulate
uses Premultiplied values to compute the
product;
SkBlendMode::kMultiply
uses Unpremultiplied values to compute
the product.
![Modulate_Blend](https://fiddle.skia.org/i/877f96610ab7638a310432674b04f837_raster.png)
Modes
SkBlendMode::kHue,
SkBlendMode::kSaturation,
SkBlendMode::kColor,
and
SkBlendMode::kLuminosity
convert source and destination pixels using all components
color information, using
non-separable
blend modes .
![Color_Blends](https://fiddle.skia.org/i/630fe21aea8369b307231f5bcf8b2d50_raster.png)