is a three-dimensional graphics directive specifying that surfaces that follow are to be drawn to emulate two-dimensional flat objects.
ToonShading[col]
uses the color col as base color.
ToonShading[{dcol,bcol,hcol}]
uses the dark color dcol, the base color bcol and highlight color hcol.
ToonShading[{w1,w2,w3}{dcol,bcol,hcol}]
uses the colors dcol, bcol and hcol weighted by the wi.
ToonShading["scheme"]
uses the specified discrete color scheme in ColorData.


ToonShading
is a three-dimensional graphics directive specifying that surfaces that follow are to be drawn to emulate two-dimensional flat objects.
ToonShading[col]
uses the color col as base color.
ToonShading[{dcol,bcol,hcol}]
uses the dark color dcol, the base color bcol and highlight color hcol.
ToonShading[{w1,w2,w3}{dcol,bcol,hcol}]
uses the colors dcol, bcol and hcol weighted by the wi.
ToonShading["scheme"]
uses the specified discrete color scheme in ColorData.
Details

- ToonShading is also known as cel shading.
- ToonShading is typically used to achieve the cartoonish or hand-drawn appearance of three-dimensional objects.
- The final colors when using toon shading are computed from the luminosity of the color resulting from standard shading, and then quantized into discrete colors.
- ToonShading[{w1,w2,w3}{dcol,bcol,hcol}] specifies that luminosity on the surface should be linearly quantized to the colors dcol, bcol and hcol with weights w1, w2 and w3. A higher weight wi indicates that more of a corresponding color should be used.
- Colors can be defined by RGBColor, Hue or any other color specification. Any number of colors can be used.
- ToonShading[] is effectively equivalent to ToonShading[{GrayLevel[0.2],GrayLevel[0.7],GrayLevel[1.]}].
- ToonShading[col] uses dark, base and highlight colors obtained by blending col with Black, Gray and White.
- In ToonShading[{dcol,bcol,hcol}], the colors dcol, bcol and hcol are weighted uniformly.
- ToonShading["scheme"] is equivalent to ToonShading[ColorData["scheme","ColorList"]].
- The setting Lighting"Accent" uses a directional light and faithfully reproduces colors on the surface.

Examples
open all close allBasic Examples (4)
Scope (13)
Basic Uses (5)
Specification (5)
ToonShading with no arguments uses three gray tones:
Specify the weight of each color:
Use a predefined color scheme from ColorData:
Lighting (3)
ToonShading works with all types of lights:
Use "Accent" lighting to faithfully reproduce colors on the surface:
Properties & Relations (3)
Specify FaceForm with ToonShading:
Approximate the default system shader with ToonShading:
Approximate GoochShading with ToonShading:
Possible Issues (2)
Related Guides
History
Text
Wolfram Research (2020), ToonShading, Wolfram Language function, https://reference.wolfram.com/language/ref/ToonShading.html.
CMS
Wolfram Language. 2020. "ToonShading." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ToonShading.html.
APA
Wolfram Language. (2020). ToonShading. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ToonShading.html
BibTeX
@misc{reference.wolfram_2025_toonshading, author="Wolfram Research", title="{ToonShading}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ToonShading.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_toonshading, organization={Wolfram Research}, title={ToonShading}, year={2020}, url={https://reference.wolfram.com/language/ref/ToonShading.html}, note=[Accessed: 11-August-2025]}