# 混合模式

混合模式是一种公式，它决定一个图像图层的每个像素如何与其下方图层中同一位置的像素相结合，从而产生从简单的透明度到变暗、变亮、对比度变化以及颜色分量互换等各种效果。这一概念是 [Adobe Photoshop](https://www.edgepedia.org/zh/adobe-photoshop)、GIMP 和 Krita 等应用程序中图层图像编辑的核心，同时也出现在网页标准（CSS）、图形 API（OpenGL）和文档格式（PDF）中。<sup>[1](https://helpx.adobe.com/photoshop/desktop/create-manage-layers/apply-layer-effects/set-layer-opacity-and-blending-modes.html)</sup><sup> • </sup><sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 混合模式取每个像素的前景色和背景色，对其进行计算，返回一个新的颜色值。<sup>[3](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/blend-mode)</sup> |
| 默认模式 | 正常，即显示像素而不进行混合计算；在位图或索引颜色图像中，Photoshop 称之为阈值。<sup>[1](https://helpx.adobe.com/photoshop/desktop/create-manage-layers/apply-layer-effects/set-layer-opacity-and-blending-modes.html)</sup><sup> • </sup><sup>[4](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)</sup> |
| 标准公式 | W3C 模型先就地应用混合，\( C_s = (1 - \alpha_b) \cdot C_s + \alpha_b \cdot B(C_b, C_s) \)，然后进行合成，\( C_o = \alpha_s \cdot F_a \cdot C_s + \alpha_b \cdot F_b \cdot C_b \)。<sup>[5](https://www.w3.org/TR/compositing-1/)</sup> |
| CSS 取值 | CSS 的 `<blend-mode>` 类型定义了 16 种模式：normal、darken、multiply、color-burn、lighten、screen、color-dodge、overlay、soft-light、hard-light、difference、exclusion、hue、saturation、color 和 luminosity。<sup>[3](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/blend-mode)</sup> |
| 浏览器支持 | CSS 的 `mix-blend-mode` 属性自 2020 年 1 月起已在各浏览器中可用。<sup>[6](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/mix-blend-mode)</sup> |
| 进入 Photoshop | 1994 年 9 月面向 Mac 发布的 Photoshop 3.0 引入了图层，同时带来了混合模式选项和不透明度控制。<sup>[7](https://tapflare.com/articles/en/pdfs/technical-history-adobe-photoshop.pdf)</sup> |
| GIMP 的分组 | GIMP 将其图层模式分为七组：正常、变亮、变暗、对比、反转、HSV 分量和 LCh 分量，此外还有 GIMP 2.10 之前的旧版模式。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup> |

## 混合的工作原理

对于每个像素，混合操作使用两个输入：基色，即下方图层中已有的颜色；混合色，即正在上方施加的图层或绘画的颜色。<sup>[4](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)</sup> 混合模式是这两个颜色的函数。在 W3C 合成模型中，混合与合成被分为两个步骤：首先由混合函数 \( B(C_b, C_s) \) 计算出一个混合色，以背景 alpha 值 \( \alpha_b \) 加权；然后由 Porter-Duff 风格的合成算子结合源和背景的 alpha 值及权重因子，将结果与背景合成。<sup>[5](https://www.w3.org/TR/compositing-1/)</sup>

这一操作严格基于逐像素进行。GIMP 的合成规范指出，尽管某些图层模式的描述可能让人以为这是让像素影响相邻像素的滤镜，但事实并非如此；拼合过程对每个像素位置独立进行。<sup>[8](https://developer.gimp.org/core/algorithm/compositing/)</sup>

不透明度与混合相互作用。图层不透明度决定透明度，从 100% 的完全不透明到 1% 的几乎不可见，它适用于任何图层类型；而填充不透明度只影响图层内容，不改变投影等图层效果。<sup>[1](https://helpx.adobe.com/photoshop/desktop/create-manage-layers/apply-layer-effects/set-layer-opacity-and-blending-modes.html)</sup>

## 主要模式分组

各应用程序将模式按用途归入不同类别。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup>

**正常组。** 正常是默认模式：在 100% 不透明度下，上层覆盖下方图层，下面的内容只能透过透明区域看到。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup> 溶解根据不透明度随机用基色或混合色替换像素，这在半透明边缘处尤为明显。<sup>[4](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)</sup><sup> • </sup><sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup> 消除类模式也属于这一组：擦除移除内容，颜色擦除则将上层的特定颜色从下层中移除，黑色像素使对应的底层部分变为透明，白色像素则不产生任何效果。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup>

**变暗组与变亮组。** 这两组保留两个输入中较暗或较亮的那个，或应用相关的公式。

**对比组。** 叠加、柔光、强光及相关模式相对于中灰色增加或降低对比度。

**分量组。** 色相、饱和度、颜色和明度在图层之间传递各个颜色分量。颜色保留基色的明度，取混合色的色相和饱和度，这能保持灰度级，用于为单色图像着色；明度则是其反向效果。<sup>[4](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)</sup> 一个经典的演示是在图像上放置一个设为 HSV 饱和度的纯白图层，使下方图层呈现为灰度。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup>

## 混合模式的应用场合

**位图编辑器。** Photoshop 的图层面板提供混合模式菜单，并在画布上实时预览，同样的模式也可从工具选项中用于绘画和编辑工具。<sup>[10](https://helpx.adobe.com/uk/photoshop/using/layer-opacity-blending.html)</sup><sup> • </sup><sup>[4](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)</sup> Krita 不仅将混合模式应用于图层，还应用于单次笔画，并提供 Alt+Shift 快捷键，可在不改变当前图层模式的情况下切换绘画所用的混合模式。<sup>[9](https://docs.krita.org/en/reference_manual/blending_modes.html)</sup> GIMP 为绘画工具提供与图层相同的模式，另有仅用于绘画的附加模式。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup>

**图层组。** 对于组，Photoshop 中的默认模式是穿透，意味着该组本身没有混合属性，其图层分别与下方内容混合。为组选择其他模式时，先将组内所有图层合成，再将整个组作为单一图像与文档的其余部分混合。<sup>[1](https://helpx.adobe.com/photoshop/desktop/create-manage-layers/apply-layer-effects/set-layer-opacity-and-blending-modes.html)</sup> GIMP 为组图层提供等效的穿透模式，被描述为对整个组的指令，而非一种混合模式本身。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup>

**CSS 与网页。** CSS 的 `mix-blend-mode` 属性设置元素内容如何与其背景混合，背景即同一层叠上下文中渲染在其后方的内容；而 `background-blend-mode` 则将元素自身的各个背景层相互混合。<sup>[6](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/mix-blend-mode)</sup> 混合模式之间的变化不进行插值；任何变化都是立即发生的。<sup>[3](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/blend-mode)</sup>

**图形 API。** OpenGL 在帧缓冲层面用一组方程定义混合，FUNC_ADD 时为 \( C = C_s S + C_d D \)，另有 FUNC_SUBTRACT、FUNC_REVERSE_SUBTRACT、MIN 和 MAX，其中 \( S \) 和 \( D \) 是由混合函数设定的权重因子。该方程对每个颜色分量分别求值，且可为 RGB 和 alpha 分别设置不同的混合函数。<sup>[11](https://registry.khronos.org/OpenGL/specs/gl/glspec14.pdf)</sup>

**文档格式。** PDF 1.7 规定了 CMYK 空间中的混合，包括色相、饱和度、颜色和明度模式下 K（黑）分量的处理方式，并指出在不进行混合时，合成公式退化为背景色与源色按其 alpha 值加权的简单平均值。<sup>[12](https://lists.w3.org/Archives/Public/www-archive/2011Feb/att-0009/Pages_from_pdf_reference_1-7.pdf)</sup>

## 实际限制

并非所有模式在任何地方都可用。在 Photoshop 中，32 位图像只能使用正常、溶解、变暗、正片叠底、变亮、线性减淡（添加）、差值、色相、饱和度、颜色和明度，而背后和清除模式仅限于在未锁定透明度的图层上工作的特定工具。<sup>[4](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)</sup> 在 GIMP 中，对图像或图层组的底层设置正常以外的模式不起作用，因为下方没有任何可供混合的内容。<sup>[2](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)</sup> 在索引颜色图像中，GIMP 将除溶解以外的所有图层模式都视为正常。<sup>[8](https://developer.gimp.org/core/algorithm/compositing/)</sup>

[色彩空间](https://www.edgepedia.org/zh/color-space)也会改变结果。

## 历史

混合模式随图层一同进入主流使用。托马斯·诺尔（Thomas Knoll）1987 年的灰度图像显示程序后来成为 Adobe Photoshop，于 1990 年初以 Photoshop 1.0 面向 Mac 发布，而 1994 年 9 月的 Photoshop 3.0 引入了带有混合模式选项和不透明度控制的图层，使得通过以不同方式混合图层进行复杂合成成为可能。<sup>[14](https://as.com/meristation/betech/quiso-arreglar-un-problema-de-su-mac-siendo-estudiante-y-acabo-creando-adobe-photoshop-por-accidente-f202604-n/)</sup><sup> • </sup><sup>[7](https://tapflare.com/articles/en/pdfs/technical-history-adobe-photoshop.pdf)</sup> 图层合成的底层数学建立在 alpha 通道之上，其历史——包括整数 alpha 和预乘 alpha——由卢卡斯影业（Lucasfilm）计算机部门联合创始人阿尔维·雷·史密斯（Alvy Ray Smith）记录，本质上就是数字图像合成的历史本身。<sup>[15](https://www.researchgate.net/publication/2336688_Alpha_and_the_History_of_Digital_Compositing)</sup> 在网页上，标准化混合随 W3C 合成与混合第 1 级规范而来，该规范定义了 CSS 所使用的属性和 Porter-Duff 及混合算法，并扩展了 canvas 的 `globalCompositeOperation` 属性。<sup>[5](https://www.w3.org/TR/compositing-1/)</sup>

## References

1. [Set layer opacity and blending modes, Adobe Photoshop Help](https://helpx.adobe.com/photoshop/desktop/create-manage-layers/apply-layer-effects/set-layer-opacity-and-blending-modes.html)
2. [Layer Modes, GIMP 3.0 manual](https://docs.gimp.org/3.0/eo/gimp-concepts-layer-modes.html)
3. [<blend-mode> CSS type, MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/blend-mode)
4. [Blending mode descriptions in Photoshop, Adobe Help](https://helpx.adobe.com/photoshop/desktop/repair-retouch/adjust-light-tone/blending-mode-descriptions.html)
5. [Compositing and Blending Level 1, W3C](https://www.w3.org/TR/compositing-1/)
6. [mix-blend-mode CSS property, MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/mix-blend-mode)
7. [The Origins and Technical History of Adobe Photoshop, Tapflare](https://tapflare.com/articles/en/pdfs/technical-history-adobe-photoshop.pdf)
8. [Compositing and layer modes in GIMP, GIMP Developer documentation](https://developer.gimp.org/core/algorithm/compositing/)
9. [Blending Modes, Krita Manual 5.3.0](https://docs.krita.org/en/reference_manual/blending_modes.html)
10. [Layer opacity and blending modes in Adobe Photoshop, Adobe Help](https://helpx.adobe.com/uk/photoshop/using/layer-opacity-blending.html)
11. [The OpenGL Graphics System: A Specification, Version 1.4, Khronos Group](https://registry.khronos.org/OpenGL/specs/gl/glspec14.pdf)
12. [PDF Reference, version 1.7](https://lists.w3.org/Archives/Public/www-archive/2011Feb/att-0009/Pages_from_pdf_reference_1-7.pdf)
13. [GIMP Layers Guide: Add, Merge, Mask and Organise Layers, GIMP.cc](https://gimp.cc/understanding-layers.html)
14. [Quiso arreglar un problema de su Mac siendo estudiante y acabó creando Adobe Photoshop por accidente, AS.com](https://as.com/meristation/betech/quiso-arreglar-un-problema-de-su-mac-siendo-estudiante-y-acabo-creando-adobe-photoshop-por-accidente-f202604-n/)
15. [Alpha and the History of Digital Compositing, Alvy Ray Smith](https://www.researchgate.net/publication/2336688_Alpha_and_the_History_of_Digital_Compositing)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Application software by domain

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/blend-modes

English original: https://www.edgepedia.org/blend-modes
