WOLFRAM

ColorCombine[{image1,image2,}]

creates a multichannel image by combining the sequence of channels in the imagei.

ColorCombine[{image1,image2,},colorspace]

combines images that represent the color components specified by colorspace.

Details

  • ColorCombine is typically used to combine multiple single-channel images into a multichannel image.
  • ColorCombine[{image1,image2,}] creates an image containing channels obtained by concatenating the sequence of channels from each imagei.
  • ColorCombine works on 2D or 3D images.
  • The images {image1,image2,} must have the same dimensions.
  • ColorCombine[{image1,image2,},colorspace] returns an image of the specified colorspace.
  • The following colorspace specifications can be given:
  • "RGB"red, green, blue (RGBColor)
    "CMYK"cyan, magenta, yellow, black (CMYKColor)
    "HSB"hue, saturation, brightness (Hue)
    "XYZ"CIE XYZ channels (XYZColor)
    "LAB"CIE Lab channels (LABColor)
    "LCH"CIE LCH channels (LCHColor)
    "LUV"CIE LUV channels (LUVColor)
  • With a colorspace that requires n color channels, n or n+1 channels may be combined. The n+1^(th) channel is used as an alpha channel.
  • When combining a color image with a grayscale image, ColorCombine creates an image of the same color space with alpha channel.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Combine three gray-level images into an RGB image:

Out[1]=1

Combine three gray-level 3D images into an RGB volume:

Out[1]=1

Scope  (6)Survey of the scope of standard use cases

Combine three binary images into an RGB image:

Out[1]=1

Combine three single-channel images into an HSB image:

Out[1]=1

Combine images into a CMYK image:

Out[1]=1

Color combine channels of a three-channel image rendered using all the supported color spaces:

Combine four single-frame images into an RGBA image:

Out[1]=1

Combine an RGB image with a single-frame image to get an RGBA image:

Out[2]=2

Create a six-channel image:

Out[1]=1

Applications  (5)Sample problems that can be solved with this function

Display a channel-wise GradientFilter:

Out[4]=4

Increase the contrast of the luminance channel only:

Out[2]=2

Highlight the result of corner filtering:

Out[1]=1

Show corners in red by adding the result to the red channel and subtract it from the green and blue channels:

Out[2]=2

Replace the red channel of an aerial image with an infrared image to highlight regions with greater biomass density:

Out[2]=2

Add an alpha channel to a 3D image that highlights a single slice:

Out[1]=1

Add an alpha channel in the shape of a Gaussian sphere to a 3D image:

Out[2]=2

Properties & Relations  (2)Properties of the function, and connections to other functions

By default, no explicit color space is assigned to the image:

Out[5]=5
Out[6]=6

Note that three channel images are rendered similarly to RGB images:

Out[7]=7

Images created with ColorCombine have Interleaving->False:

Out[1]=1
Out[2]=2

Neat Examples  (2)Surprising or curious use cases

Show color channel permutations:

Out[2]=2

Adjust a channel of an image:

Out[3]=3
Wolfram Research (2008), ColorCombine, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorCombine.html (updated 2012).
Wolfram Research (2008), ColorCombine, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorCombine.html (updated 2012).

Text

Wolfram Research (2008), ColorCombine, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorCombine.html (updated 2012).

Wolfram Research (2008), ColorCombine, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorCombine.html (updated 2012).

CMS

Wolfram Language. 2008. "ColorCombine." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/ColorCombine.html.

Wolfram Language. 2008. "ColorCombine." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/ColorCombine.html.

APA

Wolfram Language. (2008). ColorCombine. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColorCombine.html

Wolfram Language. (2008). ColorCombine. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColorCombine.html

BibTeX

@misc{reference.wolfram_2025_colorcombine, author="Wolfram Research", title="{ColorCombine}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ColorCombine.html}", note=[Accessed: 19-April-2025 ]}

@misc{reference.wolfram_2025_colorcombine, author="Wolfram Research", title="{ColorCombine}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ColorCombine.html}", note=[Accessed: 19-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_colorcombine, organization={Wolfram Research}, title={ColorCombine}, year={2012}, url={https://reference.wolfram.com/language/ref/ColorCombine.html}, note=[Accessed: 19-April-2025 ]}

@online{reference.wolfram_2025_colorcombine, organization={Wolfram Research}, title={ColorCombine}, year={2012}, url={https://reference.wolfram.com/language/ref/ColorCombine.html}, note=[Accessed: 19-April-2025 ]}