WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Wolfram Language Home Page »

ColorFunction

ColorFunction

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)

Color the surface by height:

Use predefined gradients:

Color a curve:

Color a matrix:

Color a 3D volume:

Applications  (1)

Define a one-dimensional color function:

Properties & Relations  (1)

Use predefined color gradients from ColorData :

Possible Issues  (1)

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

Turn off ColorFunctionScaling to keep the original values:

See Also

ColorFunctionScaling   MeshShading   PlotStyle   NormalsFunction   Blend   ColorData

Function Repository: DivergentColorFunction   CompileColorFunction   CubehelixColorFunction

Tech Notes

History

Introduced in 1991 (2.0) | Updated in 1999 (4.0) 2000 (4.1) 2002 (4.2) 2007 (6.0) 2012 (9.0)

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).

CMS

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

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: 27-April-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: 27-April-2025 ]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /