光谱与色彩感知
Spectrum and Color Perception
一句话来讲,色彩就是不同波形分布的光被人眼接收后产生的不同感知。 人眼有三种视锥细胞,分别响应不同波长范围。 根据三种视锥细胞的刺激比例,便能描述任一种颜色的感觉,此称为LMS空间。
In short, color is the perception of light with different wavelength distributions received by the human eye. The human eye has three types of cone cells that respond to different wavelength ranges. According to the stimulation ratio of the three types of cone cells, the feeling of any color can be described, which is called the LMS space.
CIE-XYZ 与 CIE-RGB
CIE-XYZ and CIE-RGB
由于 LMS 空间的数据难以测量,1931年,Wright 和 Guild 通过直接测量受试者对不同光谱的色彩感知获得了颜色匹配函数 (Color Matching Functions)。 颜色匹配函数获得的过程本质上是通过叠加 R、G、B 三种光谱光来匹配任意光谱的光。 即:
Since the data in the LMS space is difficult to measure, in 1931, Wright and Guild obtained the color matching functions by directly measuring the color perception of subjects to different spectra. The process of obtaining the color matching function is essentially to match the light of any spectrum by superimposing the three spectral lights R, G, and B. That is:
其中 C 为任意光谱的光,R、G、B 为三种光谱, r g b 为色值。
Where C is the light of any spectrum, R, G, and B are three spectra, and r, g, and b are the color values.
但是通过这种方式获得的颜色匹配函数会存在负值,为了解决这个问题,CIE 提出了 XYZ 空间。 XYZ 空间是通过对颜色匹配函数进行线性变换得到的,使得所有的颜色匹配函数都是正值以方便计算。 变换矩阵如下:
However, the color matching functions obtained in this way will have negative values. To solve this problem, CIE proposed the XYZ space. The XYZ space is obtained by linearly transforming the color matching functions, so that all color matching functions are positive to facilitate calculation. The transformation matrix is as follows:
RGB 空间
RGB Space
在计算机图形学领域,RGB 色彩模型最为便利,一方面它与人类视觉系统的原理类似, 另一方面它与显示设备的工作方式相符。
In the field of computer graphics, the RGB color model is the most convenient. On the one hand, it is similar to the principle of the human visual system, on the other hand, it is consistent with the working principle of the display device.
任何基于 RGB 颜色模型的加色色彩空间都属于 RGB 空间。 RGB 由红绿蓝三原色的色度来定义,借此可以定义出相应的色三角,生成其他颜色。
Any additive color space based on the RGB color model belongs to the RGB space. RGB is defined by the chromaticity of the three primary colors red, green, and blue, which can be used to define the corresponding color triangle and generate other colors.
一个完整的 RGB 空间定义还需要给出白点的色度以及 Gamma 校正曲线。 详细介绍可以查阅 维基百科。
A complete definition of the RGB space also needs to give the chromaticity of the white point and the Gamma correction curve. For more details, please refer to Wikipedia.
sRGB 空间
sRGB Space
由于生产工艺差距,相同的 RGB 值在不同设备上显示的颜色可能会有所不同。 这会使得相同的数字产品在不同显示设备上呈现出不同的颜色,不利于数字产品的标准化生产和分发。
Due to the differences in production processes, the same RGB values may display different colors on different devices. This will make the same digital product present different colors on different display devices, which is not conducive to the standardized production and distribution of digital products.
为了解决这个问题,设备厂商们协商制定了一些标准色彩空间,如 sRGB、Adobe RGB、DCI-P3 等。
To solve this problem, device manufacturers have negotiated and formulated some standard color spaces, such as sRGB, Adobe RGB, DCI-P3, etc.
其中 sRGB 是最为广泛使用的标准色彩空间,它的全称是 standard RGB。
Among them, sRGB is the most widely used standard color space, and its full name is standard RGB.
sRGB 空间的白色值为 CIE-D65,它的 XYZ 值为 。 sRGB 空间的 Gamma 校正曲线是一个分段的非线性函数,如下:
The white value of the sRGB space is CIE-D65, and its XYZ value is . The Gamma correction curve of the sRGB space is a segmented nonlinear function, as follows:
其他 RGB 空间
Other RGB Spaces
Color Space | White Point | Gamma | Coverage |
---|---|---|---|
Adobe RGB | D65 | 2.2 | 52.1% |
DCI-P3 | D65 | 2.6 | 45.5% |
ProPhoto RGB | D50 | 1.8 | 100% |
更完整的表格可以查阅 Color space eploying the RGB color model。
For a more complete table, please refer to Color space eploying the RGB color model.
参考
References
- 色彩空间表示与转换 https://zhuanlan.zhihu.com/p/24281841
- RGB 色彩空间 https://zh.wikipedia.org/wiki/RGB%E8%89%B2%E5%BD%A9%E7%A9%BA%E9%96%93
- RGB color spaces https://en.wikipedia.org/wiki/RGB_color_spaces