Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Color

Color space conversions, support for International Color Consortium (ICC) profiles

The toolbox represents colors as RGB values, but there are other models besides RGB for representing colors numerically. The various color spaces exist because they present color information in ways that make certain calculations more convenient or because they provide a more intuitive way to identify colors. The toolbox provides functions for converting color data from one color space to another. The toolbox also support International Color Consortium (ICC) profiles for describing colors.

Functions

rgb2labConvert RGB to CIE 1976 L*a*b*
rgb2ntscConvert RGB color values to NTSC color space
rgb2xyzConvert RGB to CIE 1931 XYZ
rgb2ycbcrConvert RGB color values to YCbCr color space
lab2rgbConvert CIE 1976 L*a*b* to RGB
lab2xyzConvert CIE 1976 L*a*b* to CIE 1931 XYZ
xyz2labConvert CIE 1931 XYZ to CIE 1976 L*a*b*
xyz2rgbConvert CIE 1931 XYZ to RGB
ycbcr2rgbConvert YCbCr color values to RGB color space
ntsc2rgbConvert NTSC values to RGB color space
colorcloudDisplay 3-D color gamut as point cloud in specified color space
lab2doubleConvert L*a*b* data to double
lab2uint16Convert L*a*b* data to uint16
lab2uint8Convert L*a*b* data to uint8
xyz2doubleConvert XYZ color values to double
xyz2uint16Convert XYZ color values to uint16
iccfindSearch for ICC profiles
iccreadRead ICC profile
iccrootFind system default ICC profile repository
iccwriteWrite ICC color profile to disk file
isiccTrue for valid ICC color profile
makecformCreate color transformation structure
applycformApply device-independent color space transformation
imapproxApproximate indexed image by reducing number of colors
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

Topics

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.

Was this topic helpful?