WOLFRAM

ColorDataFunction
ColorDataFunction

ColorDataFunction[range,]

is a function that represents a color scheme.

Details

Examples

open allclose all

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

ColorData returns a ColorDataFunction object:

Out[1]=1

Return a color when the specific parameters are applied:

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

Define a color function for the plot:

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

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

ColorData returns a ColorDataFunction object:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

ColorDataFunction returns RGB colors when applied to values within a specific range:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

Gradients and physical schemes are defined on continuous intervals:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4
Out[5]=5
Out[6]=6

Indexed schemes are defined at discrete values:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

Named schemes are defined at specific sets of values:

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

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

ColorDataFunction from gradients and physical schemes clips values outside of the ranges:

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

ColorDataFunction from indexed schemes repeats the colors periodically:

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

Possible Issues  (1)Common pitfalls and unexpected behavior

In a plot with multiple ColorFunction slots, the first slot is chosen, if not specified:

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

Specify a pure function so that the plot is colored by height values:

Out[3]=3

Neat Examples  (1)Surprising or curious use cases

A raster image of the web-safe colors:

Out[1]=1
Out[2]=2
Wolfram Research (2007), ColorDataFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorDataFunction.html.
Wolfram Research (2007), ColorDataFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorDataFunction.html.

Text

Wolfram Research (2007), ColorDataFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorDataFunction.html.

Wolfram Research (2007), ColorDataFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorDataFunction.html.

CMS

Wolfram Language. 2007. "ColorDataFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ColorDataFunction.html.

Wolfram Language. 2007. "ColorDataFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ColorDataFunction.html.

APA

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

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

BibTeX

@misc{reference.wolfram_2025_colordatafunction, author="Wolfram Research", title="{ColorDataFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ColorDataFunction.html}", note=[Accessed: 17-May-2025 ]}

@misc{reference.wolfram_2025_colordatafunction, author="Wolfram Research", title="{ColorDataFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ColorDataFunction.html}", note=[Accessed: 17-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_colordatafunction, organization={Wolfram Research}, title={ColorDataFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/ColorDataFunction.html}, note=[Accessed: 17-May-2025 ]}

@online{reference.wolfram_2025_colordatafunction, organization={Wolfram Research}, title={ColorDataFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/ColorDataFunction.html}, note=[Accessed: 17-May-2025 ]}