本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

颜色

颜色空间转换,支持国际色彩联盟 (ICC) 配置文件

该工具箱将颜色表示为 RGB 值,但除了 RGB 之外,还有其他一些以数值形式表示颜色的模型。之所以存在各种颜色空间,是因为它们表达颜色信息时所采用的方法可使某些计算更为便捷,或是因为它们提供了更为直观的颜色辨识方法。工具箱提供将颜色数据从一个颜色空间转换到另一个颜色空间的函数。工具箱还支持通过国际色彩联盟 (ICC) 配置文件来描述颜色。

函数

全部展开

rgb2hsv将 RGB 颜色转换为 HSV
rgb2lab将 RGB 转换为 CIE 1976 L*a*b*
rgb2ntscConvert RGB color values to NTSC color space
rgb2xyzConvert RGB to CIE 1931 XYZ
rgb2ycbcr将 RGB 颜色值转换为 YCbCr 颜色空间
hsv2rgb将 HSV 颜色转换为 RGB
lab2rgbConvert CIE 1976 L*a*b* to RGB
lab2xyzConvert CIE 1976 L*a*b* to CIE 1931 XYZ
ntsc2rgbConvert NTSC values to RGB color space
xyz2labConvert CIE 1931 XYZ to CIE 1976 L*a*b*
xyz2rgbConvert CIE 1931 XYZ to RGB
ycbcr2rgbConvert YCbCr color values to RGB color space
colorcloudDisplay 3-D color gamut as point cloud in specified color space
lab2doubleConvert L*a*b* color values to double
lab2uint16Convert L*a*b color values to uint16
lab2uint8Convert L*a*b color values to uint8
xyz2doubleConvert XYZ color values to double
xyz2uint16Convert XYZ color values to uint16
iccfindFind ICC profiles
iccreadRead ICC profile
iccrootFind system default ICC profile repository
iccwriteWrite ICC color profile data
isiccCheck for valid ICC profile data
makecformCreate color transformation structure
applycformApply device-independent color space transformation
imapprox通过减少颜色数量来近似处理索引图像
chromadaptAdjust color balance of RGB image with chromatic adaptation
colorangleAngle between two RGB vectors
illumgrayEstimate illuminant using gray world algorithm
illumpcaEstimate illuminant using principal component analysis (PCA)
illumwhiteEstimate illuminant using White Patch Retinex algorithm
lin2rgbApply gamma correction to linear RGB values
rgb2linLinearize gamma-corrected RGB values
whitepointXYZ color values of standard illuminants

主题

Understanding Color Spaces and Color Space Conversion

A color space maps a color in a multidimensional coordinate system. Color spaces have different advantages in identifying colors or performing calculations.

Device-Independent Color Spaces

Device-independent color spaces define a standardized color space where three values represent a color. Different standards exist for many applications of color display.

Profile-Based Color Space Conversions

Device profiles contain information about how input, output, and display devices reproduce colors. Convert the color space so displayed colors look the same across all devices.

Display Colors

The bit depth of a screen display defines how many distinct colors the display can produce. You can determine and change the screen bit depth of your system.

Reduce the Number of Colors in an Image

Learn how to reduce the number of colors in an image using color approximation or dithering.

特色示例