This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


is an option for graphics functions which specifies a function to apply to determine colors of elements.
  • With ColorFunction->func, the arguments supplied to func are as follows:
  • With the usual default setting ColorFunctionScaling->True, all arguments supplied to func are scaled to lie in the range 0 to 1.
  • The list of possible color function names is given by ColorData["Gradients"].
  • Combinations of directives can be specified using Directive[g1, g2, ...].
  • In 3D graphics, ColorFunction by default specifies diffuse colors for surfaces.
Color the surface by height:
Use predefined gradients:
Color a curve:
Color a matrix:
Define a one-dimensional color function:
Use predefined color gradients from ColorData:
New in 2 | Last modified in 6