Blend
✖
Blend
gives a color obtained by blending a fraction of color col1 and
of color col2.
Details

- Blend implements additive color mixing as appropriate for colored light sources or light‐generating displays.
- In Blend[{col1,…,coln},{u1,…,un}], the ui are normalized to have total 1. »
- Blend[{col1,col2,…}] blends equal fractions of all the coli.
- In Blend[{image1,image2},x], if image1 and image2 are of different dimensions, linear interpolation of the dimensions is used.
- Blend[{image,col},x] blends every pixel of image with the color col.
- In Blend[{image1,col1,…,coln,image2},x], coli is interpreted as an image whose dimensions are taken from a linear interpolation between dimensions of image1 and image2.

Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Blend two colors by fractions:

https://wolfram.com/xid/0ldlcdd-c45yuj

Generate an array of blended colors ranging from red to blue:

https://wolfram.com/xid/0ldlcdd-rxv

Represent the height as a blend from yellow to purple:

https://wolfram.com/xid/0ldlcdd-r1n

Blend pixels of an image with a color:

https://wolfram.com/xid/0ldlcdd-c617rx

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

https://wolfram.com/xid/0ldlcdd-dkyals


https://wolfram.com/xid/0ldlcdd-kece9y

Linear interpolation between two colors:

https://wolfram.com/xid/0ldlcdd-elrede

Linear interpolation between colors with opacity:

https://wolfram.com/xid/0ldlcdd-iphmxe


https://wolfram.com/xid/0ldlcdd-5enwq

Linear interpolation between multiple colors uniformly:

https://wolfram.com/xid/0ldlcdd-db4mid

Linear interpolation between colors at specific values:

https://wolfram.com/xid/0ldlcdd-pksm6

Blending colors with equal weights:

https://wolfram.com/xid/0ldlcdd-gazpd6

Blending colors with specified weights:

https://wolfram.com/xid/0ldlcdd-czls70


https://wolfram.com/xid/0ldlcdd-c5is

Images (6)
Linear interpolation between pixels of an image and a color:

https://wolfram.com/xid/0ldlcdd-ynaac9

Linear interpolation of an image and a color at a specific value:

https://wolfram.com/xid/0ldlcdd-zn7b7j

Linear interpolation of two images:

https://wolfram.com/xid/0ldlcdd-c6hwtr

Linear interpolation of two images of different dimensions:

https://wolfram.com/xid/0ldlcdd-iby1hl

Blend images and their alpha channels:

https://wolfram.com/xid/0ldlcdd-7fc6n0


https://wolfram.com/xid/0ldlcdd-gl7kkr

Applications (2)Sample problems that can be solved with this function
Use Blend to construct a ColorFunction from base colors:

https://wolfram.com/xid/0ldlcdd-cxs32d


https://wolfram.com/xid/0ldlcdd-kvo42t


https://wolfram.com/xid/0ldlcdd-25dg0

Combine multiple images with different exposures into one image:

https://wolfram.com/xid/0ldlcdd-scawmv

Properties & Relations (7)Properties of the function, and connections to other functions
The weights are always normalized, so that the sum becomes 1:

https://wolfram.com/xid/0ldlcdd-kwoiax


https://wolfram.com/xid/0ldlcdd-30lix2

The position values are always sorted:

https://wolfram.com/xid/0ldlcdd-h92d9b

When colors are specified using the same color space, that space is used for interpolation:

https://wolfram.com/xid/0ldlcdd-045ugx

When colors are specified using different color spaces, interpolation happens in the RGB space:

https://wolfram.com/xid/0ldlcdd-vzacch

Lighter is a special case of Blend:

https://wolfram.com/xid/0ldlcdd-gxnfx6

Darker is a special case of Blend:

https://wolfram.com/xid/0ldlcdd-dd70t7

ColorData contains a large number of predefined Blend colors called "Gradients":

https://wolfram.com/xid/0ldlcdd-cjry8n


https://wolfram.com/xid/0ldlcdd-c3ntr4


https://wolfram.com/xid/0ldlcdd-cycrq6

Gradients can be called by their names only:

https://wolfram.com/xid/0ldlcdd-gq2qfa

Polygon supports equal-weight blending of VertexColors:

https://wolfram.com/xid/0ldlcdd-lzzww8


https://wolfram.com/xid/0ldlcdd-bib0m2

Possible Issues (2)Common pitfalls and unexpected behavior
Values outside of the 0, 1 range will be clipped:

https://wolfram.com/xid/0ldlcdd-hr06n3

In plot functions, use ColorFunctionScaling to control global scaling of variables:

https://wolfram.com/xid/0ldlcdd-e1t1ms

Different colors can be given at a single position to generate discontinuities:

https://wolfram.com/xid/0ldlcdd-dsrpbo

Interactive Examples (4)Examples with interactive outputs
Continuous blend between two images:

https://wolfram.com/xid/0ldlcdd-j9ec45

Linear interpolation of two images with different dimensions:

https://wolfram.com/xid/0ldlcdd-0uvh5c

Blend of multiple images while going through a white background between each two images:

https://wolfram.com/xid/0ldlcdd-odjkth

Interactive representation of the linear interpolation of multiple colors:

https://wolfram.com/xid/0ldlcdd-nypfdl

Neat Examples (2)Surprising or curious use cases
Use Blend with plots to generate synthesized textures:

https://wolfram.com/xid/0ldlcdd-bgv0u2


https://wolfram.com/xid/0ldlcdd-dg3m4k


https://wolfram.com/xid/0ldlcdd-13s1g

Wolfram Research (2007), Blend, Wolfram Language function, https://reference.wolfram.com/language/ref/Blend.html (updated 2014).
Text
Wolfram Research (2007), Blend, Wolfram Language function, https://reference.wolfram.com/language/ref/Blend.html (updated 2014).
Wolfram Research (2007), Blend, Wolfram Language function, https://reference.wolfram.com/language/ref/Blend.html (updated 2014).
CMS
Wolfram Language. 2007. "Blend." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Blend.html.
Wolfram Language. 2007. "Blend." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Blend.html.
APA
Wolfram Language. (2007). Blend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Blend.html
Wolfram Language. (2007). Blend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Blend.html
BibTeX
@misc{reference.wolfram_2025_blend, author="Wolfram Research", title="{Blend}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Blend.html}", note=[Accessed: 27-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_blend, organization={Wolfram Research}, title={Blend}, year={2014}, url={https://reference.wolfram.com/language/ref/Blend.html}, note=[Accessed: 27-March-2025
]}