惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
C
Cisco Blogs
SecWiki News
SecWiki News
Know Your Adversary
Know Your Adversary
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
NISL@THU
NISL@THU
WordPress大学
WordPress大学
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threat Research - Cisco Blogs
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
Security Archives - TechRepublic
Security Archives - TechRepublic
有赞技术团队
有赞技术团队
L
LINUX DO - 热门话题
Hacker News: Ask HN
Hacker News: Ask HN
V
V2EX
G
GRAHAM CLULEY
TaoSecurity Blog
TaoSecurity Blog
Hugging Face - Blog
Hugging Face - Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
Latest news
Latest news
The Hacker News
The Hacker News
aimingoo的专栏
aimingoo的专栏
T
Troy Hunt's Blog
S
Schneier on Security
I
Intezer
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threatpost
爱范儿
爱范儿
The Register - Security
The Register - Security
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
美团技术团队
B
Blog RSS Feed

博客园 - Charltsing

C# 预处理器指令语言 - 完整语法速查 LoggerMessage:编写高性能的 .NET 日志 PDFImageViewer v2.1 PDF查看图像和无损导出工具,一键转换单图PDF为JBig2黑白PDF。兼谈PDF内嵌图像。 25 个使用.NET 10 的性能技巧 PDFontFixer v1.5 免费版,解决PDF文档复制粘贴乱码的问题,修复PDF文档字体的Unicode映射。 为什么 PDF 编辑这么难? Unicode、UTF-8、UTF-16 如何直接编辑Github的Readme.md文件 自动导入工程项目属性,Directory.Build.props 和 Directory.Build.targets 新版 C# 高效率编程指南 C# 内联数组(Inline Array):高性能数组的新选择 如何在 .NET 中使用 SIMD .NET异步编程进阶:从语法糖到高性能架构的核心突破 C# 中的安全零拷贝 使用UnsafeAccessor 访问私有字段 C# 12与.NET 8实战指南:20个提升代码质量的最佳实践 C# Net9的模块初始化器(Module Initializer) ECMA-335 CLI 规范附录 C#中避免GC压力和提高性能的8种技术 函数内联 硬件内在函数 官方:oPDF v2.1免费版,专业的PDF水印分析处理工具,无损去除水印,通杀八类PDF水印。它是PDFCommander 万能PDF水印删除工具的升级版。 C#自动引用Debug | Release版本的dll
PDF的色彩空间
Charltsing · 2026-04-20 · via 博客园 - Charltsing

PDF规范:色彩空间

PDF协会提供的官方规范ISO 32000-2:2020 (PDF 2.0)  免费下载

Working With Color Spaces 处理颜色空间

https://pdfium.patagames.com/help/html/WorkingSDK_ColorSpaces.htm#sec-indexed

Device color spaces directly specify colors or shades of gray that the output device is to produce. They provide a variety of color specification methods, including grayscale, RGB (red-green-blue), and CMYK (cyan-magenta-yellowblack), corresponding to the color space classes DeviceGray, DeviceRGB, and DeviceCMYK.
设备色彩空间直接指定输出设备应产生的颜色或灰度。它们提供多种色彩指定方法,包括灰度、RGB(红绿蓝)和 CMYK(青品黄黑),对应于色彩空间类别 DeviceGray、DeviceRGB 和 DeviceCMYK。

CIE-based color spaces are based on an international standard for color specification created by the Commission Internationale de l’Éclairage (International Commission on Illumination). These spaces specify colors in a way that is independent of the characteristics of any particular output device. Color space classes in this category include CalGray, CalRGB, Lab, and ICCBased.
基于 CIE 的色彩空间是基于国际照明委员会(Commission Internationale de l’Éclairage)创建的色彩指定标准。这些空间以独立于任何特定输出设备特性的方式指定颜色。此类中的色彩空间类别包括 CalGray、CalRGB、Lab 和 ICCBased。

Special color spaces add features or properties to an underlying color space. They include facilities for patterns, color mapping, separations, and highfidelity and multitone color. The corresponding color space classes are Pattern, Indexed, Separation, and DeviceN.
特殊色彩空间为底层色彩空间添加功能或属性。它们包括图案、色彩映射、分色以及高保真度和多色调色彩等功能。相应的色彩空间类是 Pattern、Indexed、Separation 和 DeviceN。

Device Color Spaces 设备色彩空间
The device color spaces enable a page description to specify color values that are directly related to their representation on an output device. Color values in these spaces map directly (or by simple conversions) to the application of device colorants, such as quantities of ink or intensities of display phosphors. This enables a PDF document to control colors precisely for a particular device, but the results may not be consistent from one device to another.
设备色彩空间使页面描述能够指定与输出设备直接相关的色彩值。这些空间中的色彩值直接(或通过简单转换)映射到设备色料的运用上,例如墨量或显示荧光粉的强度。这使得 PDF 文档能够精确控制特定设备的色彩,但结果可能在不同设备之间不一致。

Output devices form colors either by adding light sources together or by subtracting light from an illuminating source. Computer displays typically add colors; printing inks typically subtract them. These two ways of forming colors give rise to two complementary methods of color specification, called additive and subtractive color. The most widely used forms of these two types of color specification are known as RGB and CMYK, respectively, for the names of the primary colors on which they are based. They correspond to the following device color spaces:
输出设备通过叠加光源或从照明源中减去光线来形成颜色。计算机显示器通常通过叠加颜色形成;印刷油墨通常通过减去颜色形成。这两种形成颜色的方式产生了两种互补的颜色指定方法,称为加色法和减色法。这两种类型颜色指定的最常用形式分别被称为 RGB 和 CMYK,它们基于的分别是原色名称。它们对应以下设备颜色空间:

DeviceGray controls the intensity of achromatic light, on a scale from black to white.
DeviceGray 控制无彩色光的强度,从黑到白。

DeviceRGB controls the intensities of red, green, and blue light, the three additive primary colors used in displays.
DeviceRGB 控制红、绿、蓝三种光线的强度,即显示器使用的三种加色原色。

DeviceCMYK controls the concentrations of cyan, magenta, yellow, and black inks, the four subtractive process colors used in printing.
DeviceCMYK 控制青、品红、黄和黑色油墨的浓度,即印刷使用的四种减色过程色。

DeviceGray Color Space 设备Gray 颜色空间
Black, white, and intermediate shades of gray are special cases of full color. A grayscale value is represented by a single number in the range 0.0 to 1.0, where 0.0 corresponds to black, 1.0 to white, and intermediate values to different gray levels.
黑色、白色以及介于两者之间的灰色是全色的特殊情况。灰度值由一个介于 0.0 到 1.0 之间的数字表示,其中 0.0 对应黑色,1.0 对应白色,而中间值则对应不同的灰度级别。

DeviceRGB Color Space 设备RGB 色彩空间
Colors in the DeviceRGB color space are specified according to the additive RGB (red-green-blue) color model, in which color values are defined by three components representing the intensities of the additive primary colorants red, green, and blue. Each component is specified by a number in the range 0.0 to 1.0, where 0.0 denotes the complete absence of a primary component and 1.0 denotes maximum intensity. If all three components have equal intensity, the perceived result theoretically is a pure gray on the scale from black to white. If the intensities are not all equal, the result is some color other than a pure gray.
在 DeviceRGB 颜色空间中,颜色根据加色 RGB(红-绿-蓝)颜色模型进行指定,其中颜色值由三个分量定义,分别代表加色原色红、绿和蓝的强度。每个分量由 0.0 到 1.0 范围内的数值指定,其中 0.0 表示该原色分量的完全缺失,1.0 表示最大强度。如果三个分量的强度相等,理论上感知结果是从黑到白范围内的纯灰色。如果强度不相等,结果将是某种非纯灰色的颜色。

DeviceCMYK Color Space 设备CMYK 色彩空间
The DeviceCMYK color space allows colors to be specified according to the subtractive CMYK (cyan-magenta-yellow-black) model typical of printers and other paper-based output devices. In theory, each of the three standard process colorants used in printing (cyan, magenta, and yellow) absorbs one of the additive primary colors (red, green, and blue, respectively). Black, a fourth standard process colorant, absorbs all of the additive primaries in equal amounts. The four components in a DeviceCMYK color value represent the concentrations of these process colorants. Each component is specified by a number in the range 0.0 to 1.0, where 0.0 denotes the complete absence of a process colorant (that is, absorbs none of the corresponding additive primary) and 1.0 denotes maximum concentration (absorbs as much as possible of the additive primary). Note that the sense of these numbers is opposite to that of RGB color components.
DeviceCMYK 色彩空间允许根据打印机及其他基于纸张的输出设备典型的减色 CMYK(青色-品红色-黄色-黑色)模型来指定颜色。理论上,印刷中使用的三种标准过程色料(青色、品红色和黄色)分别吸收一种加色原色(红色、绿色和蓝色)。黑色作为第四种标准过程色料,则等量吸收所有加色原色。DeviceCMYK 色彩值中的四个分量代表这些过程色料的浓度。每个分量由 0.0 到 1.0 范围内的数值指定,其中 0.0 表示过程色料完全不存在(即不吸收相应的加色原色),而 1.0 表示最大浓度(尽可能多地吸收加色原色)。请注意,这些数值的含义与 RGB 色彩分量的含义相反。

CIE-Based Color Spaces 基于 CIE 的颜色空间
Calibrated color in PDF is defined in terms of an international standard used in the graphic arts, television, and printing industries. CIE-based color spaces enable a page description to specify color values in a way that is related to human visual perception. The goal is for the same color specification to produce consistent results on different output devices, within the limitations of each device. Patagames PDF SDK supports four CIE based color space families, named CalGray, CalRGB, Lab, and ICCBased.
PDF 中的校准颜色是根据图形艺术、电视和印刷行业使用的国际标准来定义的。基于 CIE 的颜色空间使页面描述能够以与人类视觉感知相关的方式指定颜色值。其目标是在每个设备的限制范围内,使相同的颜色规范在不同的输出设备上产生一致的结果。Patagames PDF SDK 支持四种基于 CIE 的颜色空间家族,分别是 CalGray、CalRGB、Lab 和 ICCBased。

The CalRGB and Lab color spaces are special cases of three-component CIE-based color spaces, known as CIE-based ABC color spaces. Color values in a CIE-based ABC color space have three components, arbitrarily named A, B, and C.
CalRGB 和 Lab 色彩空间是三分量 CIE 基础色彩空间的一种特殊情况,被称为 CIE 基础 ABC 色彩空间。在 CIE 基础 ABC 色彩空间中,色彩值具有三个分量,任意命名为 A、B 和 C。

CalGray Color Space CalGray 颜色空间
A CalGray color space is a special case of a single component CIEbased color space, known as a CIE-based A color space. This type of space is the one dimensional analog of CIE-based ABC spaces. Color values in a CIE-based A space have a single component, arbitrarily named A and represents the gray component of a calibrated gray space. This component must be in the range 0.0 to 1.0.
一个 CalGray 色彩空间是单分量 CIE 色彩空间的一种特殊情况,称为 CIE 色彩空间 A。这种空间是 CIE 色彩空间 ABC 的一维类似物。在 CIE 色彩空间 A 中,色彩值只有一个分量,任意命名为 A,表示校准灰度空间的灰度分量。该分量必须在 0.0 到 1.0 的范围内。

A CalGray color space is a color space with only one transformation stage instead of two. The decoding function is a gamma function whose coefficient is specified by the Gamma property. The transformation matrix is derived from the WhitePoint property.
一个 CalGray 色彩空间只有一个转换阶段,而不是两个。解码函数是一个伽马函数,其系数由 Gamma 属性指定。转换矩阵由 WhitePoint 属性导出。

Gamma must be positive and is generally greater than or equal to 1. Default value: 1.
Gamma 必须是正数,通常大于或等于 1。默认值:1。

WhitePoint.X and WhitePoint.Z must be positive, and WhitePoint.Y must be equal to 1.0.
WhitePoint.X 和 WhitePoint.Z 必须是正数,WhitePoint.Y 必须等于 1.0。

The following example establishes a space consisting of the Y dimension of the CIE 1931 XYZ space with the CCIR XA/11 recommended D65 white point.
以下示例建立了一个由 CIE 1931 XYZ 空间的 Y 维度和 CCIR XA/11 推荐的 D65 白点组成的色彩空间。

CalRGB Color Space CalRGB 色彩空间
A CalRGB color space is a CIE-based ABC color space with only one transformation stage instead of two. In this type of space, A, B, and C represent calibrated red, green, and blue color values. These three color components must be in the range 0.0 to 1.0; component values falling outside that range are adjusted to the nearest valid value without error indication. The decoding functions are gamma functions whose coefficients are specified by the Gamma property. The transformation matrix is defined by the Matrix property.
一个 CalRGB 色彩空间是基于 CIE 的 ABC 色彩空间,它只有一个转换阶段而不是两个。在这种色彩空间中,A、B 和 C 分别代表校准后的红、绿和蓝色值。这三个色彩分量必须在 0.0 到 1.0 的范围内;超出该范围的分量值会被调整到最近的合法值,且不会产生错误提示。解码函数是伽马函数,其系数由 Gamma 属性指定。转换矩阵由 Matrix 属性定义。

The WhitePoint and BlackPoint control the overall effect of the CIE-based gamut mapping function. Typically, the colors specified by WhitePoint and BlackPoint are mapped to the nearly lightest and nearly darkest achromatic colors that the output device is capable of rendering in a way that preserves color appearance and visual contrast.
白点(WhitePoint)和黑点(BlackPoint)控制基于 CIE 的色域映射函数的整体效果。通常,白点和黑点指定的颜色会被映射到输出设备能够渲染的几乎最亮和几乎最暗的非彩色中,同时保持颜色外观和视觉对比度。

WhitePoint is assumed to represent the diffuse achromatic highlight, not a specular highlight. Specular highlights, achromatic or otherwise, are often reproduced lighter than the diffuse highlight. X and Z must be positive, and Y must be equal to 1.0.
白点被假定为表示漫射非彩色高光,而不是镜面高光。镜面高光,无论是否为非彩色,通常都比漫射高光更亮。X 和 Z 必须为正数,Y 必须等于 1.0。

BlackPoint is assumed to represent the diffuse achromatic shadow; its value is typically limited by the dynamic range of the input device. All three of black point numbers (X, Y, and Z) must be non-negative.
黑点被假定为表示漫射非彩色阴影;其值通常受限于输入设备的动态范围。黑点数值(X、Y 和 Z)都必须是非负数。

Gamma specifying the gamma for the red, green, and blue (A, B, and C) components of the color space.
指定红色、绿色和蓝色(A、B 和 C)分量颜色的伽马值。

Lab Color Space Lab 色彩空间
The Lab color space is a CIE-based ABC color space with two transformation stages. In this type of space, A, B, and C represent the L*, a*, and b* components of a CIE 1976 L*a*b* space. The range of the first (L*) component is always 0 to 100; the ranges of the second and third (a* and b*) components are defined by the aMin, aMax, bMin, and bMax properties.
Lab 颜色空间是一个基于 CIE 的 ABC 颜色空间,具有两个转换阶段。在这种颜色空间中,A、B 和 C 分别代表 CIE 1976 L*a*b*空间中的 L*、a*和 b*分量。第一个(L*)分量的范围始终为 0 到 100;第二和第三个(a*和 b*)分量的范围由 aMin、aMax、bMin 和 bMax 属性定义。

The below example example defines the CIE 1976 L*a*b* space with the CCIR XA/11–recommended D65 white point. The a* and b* components, although theoretically unbounded, are defined to lie in the useful range −128 to +127.

ICCBased Color Space ICCBased 色彩空间
ICCBased color space is based on a cross-platform color profile as defined by the International Color Consortium (ICC). Unlike the CalGray, CalRGB, and Lab color spaces, which are characterized by WhitePoint, BlackPoint, Gamma, etc , the ICCBased color space is characterized by a sequence of bytes in a standard format. Details of the profile format can be found in the ICC specification.
ICCBased 颜色空间基于国际色彩联盟(ICC)定义的跨平台色彩配置文件。与具有白点、黑点、伽马等特征的 CalGray、CalRGB 和 Lab 颜色空间不同,ICCBased 颜色空间由标准格式中的一系列字节来表征。配置文件格式的详细信息可以在 ICC 规范中找到。

An alternate color space is used in case the one specified in the iccProfile is not supported. The alternate space may be any valid color space (except a Pattern color space) that has the number of components specified by Components. If this entry is omitted and the application does not understand the ICC profile data, the color space used is DeviceGray, DeviceRGB, or DeviceCMYK, depending on whether the value of Components is 1, 3, or 4, respectively.
如果 iccProfile 中指定的颜色空间不被支持,则使用备用颜色空间。备用空间可以是任何有效的颜色空间(Pattern 颜色空间除外),且其组件数量由 Components 指定。如果省略此条目且应用程序不理解 ICC 配置文件数据,则使用的颜色空间取决于 nComponents 的值,分别为 DeviceGray、DeviceRGB 或 DeviceCMYK,当 Components 的值分别为 1、3 或 4 时。

Note Note Note 注意
There is no conversion of source color values, such as a tint transformation, when using the alternate color space. Color values within the range of the ICCBased color space might not be within the range of the alternate color space. In this case, the nearest values within the range of the alternate space are substituted.
使用备用色彩空间时,不会转换源色彩值,例如色调转换。ICCBased 色彩空间范围内的色彩值可能不在备用色彩空间的范围内。在这种情况下,会用备用空间范围内的最接近值进行替换。

Special Color Spaces 特殊色彩空间
Special color spaces add features or properties to an underlying color space. There are four special color space families: Indexed, Separation, DeviceN, and Pattern.
特殊色彩空间为底层色彩空间添加功能或属性。有四种特殊色彩空间系列:Indexed、Separation、DeviceN 和 Pattern。

Indexed Color Spaces 索引色空间
An Indexed color space allows a PDF content stream to use small integers as indices into a color map or color table of arbitrary colors in some other space. A PDF consumer application treats each sample value as an index into the color table and uses the color value it finds there. This technique can considerably reduce the amount of data required to represent a sampled image—for example, by using 8-bit index values as samples instead of 24-bit RGB color values.
一个索引色彩空间允许 PDF 内容流使用小的整数作为索引,以访问其他空间中任意颜色的色图或色表。PDF 消费者应用程序将每个样本值视为色表中的索引,并使用在该处找到的颜色值。这种技术可以显著减少表示采样图像所需的数据量——例如,通过使用 8 位索引值作为样本,而不是 24 位 RGB 颜色值。

base color space identifies the base color space in which the values in the color table are to be interpreted. It can be any device or CIE-based color space or Separation or DeviceN space, but not a Pattern space or another Indexed space. For example, if the base color space is DeviceRGB, the values in the colorTable are to be interpreted as red, green, and blue components; if the base color space is a CIE-based ABC space such as a CalRGB or Lab space, the values are to be interpreted as A, B, and C components.
base color space 指定颜色表中的值应在其基础颜色空间中解释。它可以是指定的设备颜色空间或基于 CIE 的颜色空间、Separation 或 DeviceN 空间,但不能是 Pattern 空间或另一个 Indexed 空间。例如,如果基础颜色空间是 DeviceRGB,则 colorTable 中的值应解释为红、绿和蓝分量;如果基础颜色空间是基于 CIE 的 ABC 空间,如 CalRGB 或 Lab 空间,则值应解释为 A、B 和 C 分量。

The HiVal property is an integer that specifies the maximum valid index value. In other words, the color table is to be indexed by integers in the range 0 to HiVal. hival can be no greater than 255, which is the integer required to index a table with 8-bit index values.
HiVal 属性是一个整数,用于指定最大有效索引值。换句话说,颜色表应由 0 到 HiVal 范围内的整数进行索引。hival 不能超过 255,这是用于索引具有 8 位索引值的表所需的整数。

The colorTable data must be m × (HiVal + 1) bytes long, where m is the number of color components in the base color space. Each byte is an unsigned integer in the range 0 to 255 that is scaled to the range of the corresponding color component in the base color space; that is, 0 corresponds to the minimum value in the range for that component, and 255 corresponds to the maximum.
colorTable 数据必须为 m × (HiVal + 1) 字节长,其中 m 是 base色彩空间 中的颜色分量数量。每个字节是无符号整数,范围在 0 到 255 之间,并缩放到基本颜色空间中相应颜色分量的范围;也就是说,0 对应该分量的最小值,255 对应最大值。

The color components for each entry in the colorTable appear consecutively. For example, if the base color space is DeviceRGB and the indexed color space contains three colors, the order of bytes in the string or stream is R0, G0, B0, R1, G1, B1, R2, G2, B2 where letters denote the color component and numeric subscripts denote the table entry.
colorTable 中的每个条目的颜色分量是连续出现的。例如,如果基础色彩空间是 DeviceRGB,索引色彩空间包含三种颜色,字符串或流中的字节顺序是 R0、G0、B0、R1、G1、B1、R2、G2、B2,其中字母表示颜色分量,数字下标表示表条目。

Separation Color Space 分色空间
Color output devices produce full color by combining primary or process colorants in varying amounts. On an additive color device such as a display, the primary colorants consist of red, green, and blue phosphors; on a subtractive device such as a printer, they typically consist of cyan, magenta, yellow, and sometimes black inks. In addition, some devices can apply special colorants, often called spot colorants, to produce effects that cannot be achieved with the standard process colorants alone. Examples include metallic and fluorescent colors and special textures.
色彩输出设备通过混合主色或过程色料的不同量来产生全色彩。在加色设备(如显示器)上,主色料由红、绿、蓝荧光粉组成;在减色设备(如打印机)上,它们通常由青、品红、黄和有时黑色墨水组成。此外,一些设备可以应用特殊色料,通常称为专色料,以产生仅用标准过程色料无法实现的特殊效果。例如包括金属色、荧光色和特殊纹理。

When printing a page, most devices produce a single composite page on which all process colorants (and spot colorants, if any) are combined. However, some devices, such as imagesetters, produce a separate, monochromatic rendition of the page, called a separation, for each colorant. When the separations are later combined—on a printing press, for example—and the proper inks or other colorants are applied to them, the result is a full-color page.
在打印页面时,大多数设备会在一个复合页面上打印所有过程色料(如果有专色料也会一起打印)。然而,某些设备,如图像设定器,会为每种色料生成一个单独的、单色的页面版本,称为分色。当这些分色后来被组合在一起——例如在印刷机上——并且将适当的油墨或其他色料应用到它们上时,结果就是一个全彩页面。

A Separation color space provides a means for specifying the use of additional colorants or for isolating the control of individual color components of a device color space for a subtractive device. When such a space is used, the color is a single-component value, called a tint, that controls the application of the given colorant or color components only.
一个 Separation 色彩空间提供了一种指定使用额外色料的方法,或者用于隔离控制减色设备色彩空间中单个色彩分量的控制。当使用这种空间时,色彩是一个单分量值,称为色调,它仅控制给定色料或色彩分量的应用。

As mentioned above, a color value in a Separation color space consists of a single tint component in the range 0.0 to 1.0. The value 0.0 represents the minimum amount of colorant that can be applied; 1.0 represents the maximum. Tints are always treated as subtractive colors, even if the device produces output for the designated component by an additive method. Thus, a tint value of 0.0 denotes the lightest color that can be achieved with the given colorant, and 1.0 is the darkest.
如上所述,Separation 色彩空间中的颜色值由一个范围在 0.0 到 1.0 的单个色调分量组成。0.0 代表可应用的最低色料量;1.0 代表最高。无论设备通过加成方法为指定分量产生输出,色调始终被视为减色。因此,0.0 的色调值表示使用给定色料可达到的最浅颜色,而 1.0 是最深的。

The Colorant property specify the name of the colorant that this Separation color space is intended to represent (or one of the special names All or None). Such colorant names are arbitrary, and there can be any number of them, subject to implementation limits.
The Colorant 属性指定这个 Separation 色彩空间打算表示的色料的名称(或特殊的名称 All 或 None)。此类色料名称是任意的,可以有任意数量,取决于实现限制。

The special colorant name All refers collectively to all colorants available on an output device, including those for the standard process colorants. When a Separation space with this colorant name is the current color space, painting operators apply tint values to all available colorants at once. This is useful for purposes such as painting registration targets in the same place on every separation. Such marks are typically painted as the last step in composing a page to ensure that they are not overwritten by subsequent painting operations.
特殊色料名称"All"统指输出设备上所有可用的色料,包括标准过程色料。当使用具有此色料名称的 Separation 空间作为当前色空间时,绘画操作符会一次性对所有可用色料应用色调值。这对于在每次分色时在相同位置绘制注册目标等用途很有用。此类标记通常在组合页面时作为最后一步绘制,以确保它们不会被后续的绘画操作覆盖。

The special colorant name None never produces any visible output. Painting operations in a Separation space with this colorant name have no effect on the current page.
特殊着色剂名称 None 从不产生任何可见输出。在 Separation 空间中使用该着色剂名称的绘画操作对当前页面没有任何影响。

All devices support Separation color spaces with the colorant names All and None, even if they do not support any others. Separation spaces with either of these colorant names ignore the Alternate and TintTransform properties, although valid values must still be provided.
所有设备都支持具有颜色名称"All"和"None"的 Separation 颜色空间,即使它们不支持任何其他颜色空间。具有这些颜色名称的分色空间会忽略 Alternate 和 TintTransform 属性,尽管仍然必须提供有效的值。

If the colorant name associated with a Separation color space does not correspond to a colorant available on the device, the application arranges for subsequent painting operations to be performed in an alternate color space. The intended colors can be approximated by colors in a device or CIE-based color space, which are then rendered with the usual primary or process colorants:
如果与 Separation 色彩空间关联的颜料名称与设备上可用的颜料不对应,应用程序将安排后续的绘制操作在备用色彩空间中执行。目标颜色可以通过设备或基于 CIE 的色彩空间中的颜色来近似,然后使用通常的主色或工艺颜料进行渲染:

Alternate identifies the alternate color space, which can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN).
Alternate 识别备用色彩空间,该色彩空间可以是任何设备色彩空间或基于 CIE 的色彩空间,但不能是其他特殊色彩空间(Pattern、Indexed、Separation 或 DeviceN)。

During subsequent painting operations, an application calls the function to transform a tint value into color component values in the alternate color space. The TintFunction is called with the tint value and must return the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space.
在后续的绘画操作中,应用程序调用该函数将色调值转换为备用色彩空间中的颜色分量值。TintFunction 会接收到色调值,并必须返回相应的颜色分量值。也就是说,分量数量及其值的解释取决于备用色彩空间。

DeviceN Color Space DeviceN色彩空间
DeviceN color spaces can contain an arbitrary number of color components. They provide greater flexibility than is possible with standard device color spaces such as DeviceCMYK or with individual Separation color spaces. For example, it is possible to create a DeviceN color space consisting of only the cyan, magenta, and yellow color components, with the black component excluded.
DeviceN 色彩空间可以包含任意数量的色彩组件。它们比标准设备色彩空间(如 DeviceCMYK)或单独的 Separation 色彩空间提供了更高的灵活性。例如,可以创建一个仅包含青色、品红色和黄色色彩组件的 DeviceN 色彩空间,而排除黑色组件。

DeviceN color spaces are used in applications such as these:
DeviceN 色彩空间用于以下应用:

High-fidelity color is the use of more than the standard CMYK process colorants to produce an extended gamut, or range of colors. A popular example is the PANTONE Hexachrome system, which uses six colorants: the usual cyan, magenta, yellow, and black, plus orange and green.
高保真色彩是指使用超过标准 CMYK 工艺色彩剂来产生一个扩展色域(或色彩范围)。一个流行的例子是 PANTONE Hexachrome 系统,该系统使用六种色彩剂:通常的青色、品红色、黄色和黑色,外加橙色和绿色。

Multitone color systems use a single-component image to specify multiple color components. In a duotone, for example, a single-component image can be used to specify both the black component and a spot color component. The tone reproduction is generally different for the different components. For example, the black component might be painted with the exact sample data from the single-component image; the spot color component might be generated as a nonlinear function of the image data in a manner that emphasizes the shadows.
多色系统使用单一成分图像来指定多个颜色成分。例如,在双色调印刷中,单一成分图像可以用来指定黑色成分和专色成分。不同成分的色调再现通常是不同的。例如,黑色成分可能使用单一成分图像的精确样本数据来绘制;专色成分可能以强调阴影的方式,作为图像数据的非线性函数来生成。

DeviceN was designed to represent color spaces containing multiple components that correspond to colorants of some target device. As with Separation color spaces, PDF consumer applications must be able to approximate the colorants if they are not available on the current output device, such as a display. To accomplish this, the color space definition provides a tint transformation function that can be used to convert all the components to an alternate color space.
DeviceN 是为了表示包含多个成分的颜色空间而设计的,这些成分对应于某些目标设备的着色剂。与 Separation 颜色空间一样,PDF 消费者应用程序必须能够在当前输出设备(如显示器)上无法提供着色剂时,近似表示这些着色剂。为了实现这一点,颜色空间定义提供了一个色调变换函数,该函数可用于将所有成分转换为备用颜色空间。

DeviceN color spaces are defined in a similar way to Separation color spaces—in fact, a Separation color space can be defined as a DeviceN color space with only one component.
DeviceN 色彩空间与 Separation 色彩空间定义方式相似——实际上,一个 Separation 色彩空间可以定义为一个仅包含一个组件的 DeviceN 色彩空间。

The Colorants property is an array of names specifying the individual color components. The length of the array determines the number of components in the DeviceN color space. The component names must all be different from one another, except for the name None. The special name All, used by Separation color spaces, is not allowed.
Colorants 属性是一个名称数组,用于指定各个色彩组件。数组的长度决定了 DeviceN 色彩空间中组件的数量。组件名称必须互不相同,除了 None 名称。Separation 色彩空间使用的特殊名称 All 是不允许的。

The color component name None, indicates that the corresponding color component is never painted on the page, as in a Separation color space for the None colorant. However, when the DeviceN color space reverts to its alternate color space, those components are passed to the tint transformation function, which can use them as desired.
色彩组件名称 None 表示对应的色彩组件永远不会在页面上绘制,就像 None 色剂的 Separation 色彩空间一样。然而,当 DeviceN 色彩空间恢复到其备用色彩空间时,这些组件会被传递给色调变换函数,该函数可以根据需要使用它们。

Color values are tint components in the range 0.0 to 1.0. 0.0 always represents the minimum amount of colorant; 1.0 represents the maximum. Tints are always treated as subtractive colors, even if the device produces output for the designated component by an additive method. Thus, a tint value of 0.0 denotes the lightest color that can be achieved with the given colorant, and 1.0 the darkest. (This convention is the same one as for DeviceCMYK color components but opposite to the one for DeviceGray and DeviceRGB.)
颜色值是介于 0.0 到 1.0 范围内的色调分量。0.0 始终代表最小量的着色剂;1.0 代表最大量。无论设备通过加色法产生指定分量的输出,色调始终被视为减色。因此,0.0 的色调值表示使用给定着色剂所能达到的最浅色,而 1.0 表示最深色。(这一惯例与 DeviceCMYK 颜色分量相同,但与 DeviceGray 和 DeviceRGB 相反。)

The Alternate can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN). If any of the component names in the color space do not correspond to a colorant available on the device, the PDF consumer application can perform subsequent painting operations in the alternate color space specified by this parameter.
Alternate 可以是任何设备或基于 CIE 的颜色空间,但不能是其他特殊颜色空间(Pattern、Indexed、Separation 或 DeviceN)。如果颜色空间中的任何组件名称与设备上可用的着色剂不对应,PDF 消费者应用程序可以在该参数指定的备用颜色空间中执行后续的绘画操作。

The TintTransform specifies a function that is used to transform the tint values into the alternate color space. It is called with n tint values and returns m color component values, where n is the number of components needed to specify a color in the DeviceN color space and m is the number required by the alternate color space.
TintTransform 指定一个函数,用于将色调值转换为备用颜色空间。它接收 n 个色调值并返回 m 个颜色分量值,其中 n 是指定 DeviceN 颜色空间中颜色所需的分量数量,m 是备用颜色空间所需的分量数量。

Pattern Color Space 模式色彩空间
A Pattern color space enables a PDF content stream to paint an area with a pattern rather than a single color. The pattern may be either a tiling pattern or a shading pattern. Section, Patterns discusses patterns in detail.
一个 Pattern 颜色空间允许 PDF 内容流用图案而不是单一颜色来绘制区域。该图案可能是一个平铺图案或一个渐变图案。
图案在这里讨论 https://pdfium.patagames.com/help/html/WorkingSDK_Patterns.htm