WOLFRAM

is an option for graphics functions that specifies a function to apply to determine colors of elements.

Details

Examples

open allclose all

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

Color the surface by height:

Out[1]=1

Use predefined gradients:

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

Color a curve:

Out[1]=1

Color a matrix:

Out[1]=1

Color a 3D volume:

Out[1]=1

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

Define a one-dimensional color function:

Out[2]=2
Out[3]=3

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

Use predefined color gradients from ColorData:

Out[1]=1

Possible Issues  (1)Common pitfalls and unexpected behavior

By default, the arguments to ColorFunction are rescaled to be between 0 and 1:

Out[1]=1

Turn off ColorFunctionScaling to keep the original values:

Out[2]=2
Wolfram Research (1991), ColorFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorFunction.html (updated 2012).
Wolfram Research (1991), ColorFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorFunction.html (updated 2012).

Text

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

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

CMS

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

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

APA

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

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

BibTeX

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

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

BibLaTeX

@online{reference.wolfram_2025_colorfunction, organization={Wolfram Research}, title={ColorFunction}, year={2012}, url={https://reference.wolfram.com/language/ref/ColorFunction.html}, note=[Accessed: 08-July-2025 ]}

@online{reference.wolfram_2025_colorfunction, organization={Wolfram Research}, title={ColorFunction}, year={2012}, url={https://reference.wolfram.com/language/ref/ColorFunction.html}, note=[Accessed: 08-July-2025 ]}