is a two‐dimensional directive specifying that graphics objects are to be drawn with an additional blurred offset image.
DropShadowing[{dx,dy}]
uses an absolute offset {dx,dy}.
DropShadowing[{dx,dy},r]
applies a blur effect with radius r.
DropShadowing[{dx,dy},r,col]
uses the specified color col for the blurred offset image.
DropShadowing
is a two‐dimensional directive specifying that graphics objects are to be drawn with an additional blurred offset image.
DropShadowing[{dx,dy}]
uses an absolute offset {dx,dy}.
DropShadowing[{dx,dy},r]
applies a blur effect with radius r.
DropShadowing[{dx,dy},r,col]
uses the specified color col for the blurred offset image.
Details
- DropShadowing is also known as drop shadow.
- DropShadowing is typically used to simulate 3D depth in a 2D object.
- DropShadowing[{dx,dy}] specifies that the blurred offset image should be moved by absolute offset {dx,dy}.
- DropShadowing[{dx,dy},r] applies a Gaussian blur effect with radius r.
- DropShadowing[{dx,dy},r,col] uses the color col for the blurred offset image.
- DropShadowing[{dx,dy},r,Inherited] uses the color of the graphics object with an opacity of
for the blurred offset image. - DropShadowing[{dx, dy}, r] uses the color GrayLevel[0,1/3] for the blurred offset image.
- DropShadowing[] is equivalent to DropShadowing[{-3,-3},2,GrayLevel[0,1/3]].
- For a color col, DropShadowing[col] is equivalent to DropShadowing[{-3,-3},2,col].
- For a number r, DropShadowing[r] is equivalent to DropShadowing[{-3,-3},r,GrayLevel[0,1/3]].
- For a list {dx,dy}, DropShadowing[{dx,dy}] is equivalent to DropShadowing[{dx,dy},2,GrayLevel[0,1/3]].
Examples
open all close allBasic Examples (3)
Apply a drop shadow effect to text:
Graphics[{DropShadowing[], Text[Style["Shadow", 32]]}]Plot[{2 Sin[x] + x, 2 Cos[x] + x}, {x, 0, 15}, PlotStyle -> DropShadowing[]]Show a map of the US with drop shadow:
GeoGraphics[{GeoStyling["OutlineMap",
DropShadowing[{-3, -3}, 6], RGBColor[0.7411765055418048, 0.8549020847953749, 0.6705883350216774]],
Polygon[["US"]]}]Scope (16)
Basic Uses (7)
Apply drop shadow to graphics primitives:
Graphics[{DropShadowing[], #}]& /@ {Point[{{6, 3}, {0, 4}, {2, 0}, {3, 2}, {9, 5}}], BSplineCurve[{{3, 3}, {3, 4}, {2, 3}, {3, 2}, {4, 3}}], Polygon[{{3, 1}, {9, 8}, {0, 5}, {9, 3}, {4, 9}}]}Apply drop shadow to Text:
Graphics[{DropShadowing[], Text[Style["Shadow", 24]]}]Plot[{3Sin[x] + x, 3Cos[x] + x}, {x, 0, 15}, PlotStyle -> DropShadowing[]]BarChart[{1, 2, 3, 4}, ChartStyle -> DropShadowing[]]Region[Style[ImplicitRegion[y ^ 2 < x (-1 + x ^ 3), {x, y}], DropShadowing[]]]GeoGraphics[{GeoStyling["OutlineMap",
DropShadowing[{-3, -3}, 6], RGBColor[0.7411765055418048, 0.8549020847953749, 0.6705883350216774]],
Polygon[["austria"]]}]DropShadowing[]Specifications (9)
DropShadowEffect with no arguments draws a translucent shadow to the bottom left of the object:
Graphics[{DropShadowing[], Annulus[]}, PlotRangePadding -> 0.2]Specify the offset of the shadow relative to the original object:
Graphics[{DropShadowing[#], Annulus[]}, PlotRangePadding -> 0.3]& /@ {{-8, 0}, {0, -8}, {8, 0}}Use a custom shadow blur radius:
Graphics[{DropShadowing[{-6, -6}, #], Annulus[{0, 0}, {8, 9}]}, PlotRangePadding -> 4]& /@ {0, 2, 6}The shadow color is set to GrayLevel[0,1/3] by default:
Graphics[{DropShadowing[], RGBColor[0., 2/3, 1.], Annulus[]}, PlotRangePadding -> 0.2]Set the shadow color explicitly:
Graphics[{DropShadowing[{-3, -3}, 2, RGBColor[1., 1/3, 0.]], RGBColor[0., 2/3, 1.], Annulus[]}, PlotRangePadding -> 0.2]Set the color to Inherited to use the FaceForm color of the original object with half opacity:
Graphics[{DropShadowing[{-3, -3}, 2, Inherited], #, Annulus[]}, PlotRangePadding -> 0.2]& /@ {RGBColor[0., 2/3, 1.], RGBColor[1., 3/4, 0.], RGBColor[1., 1/3, 0.]}DropShadowEffect works with shadow colors with opacity:
Graphics[{DropShadowing[{-6, -6}, 2, Opacity[#, RGBColor[1, 3/4, 0]]], Annulus[]}, PlotRangePadding -> 0.2]& /@ {1 / 10, 1 / 2, 1}Use the FaceForm color of the original object with a custom opacity:
Graphics[{RGBColor[0, 2/3, 1], DropShadowing[{-6, -6}, 2, Opacity[#]], Annulus[]}, PlotRangePadding -> 0.2]& /@ {1 / 10, 1 / 2, 9 / 10}Use LightDarkSwitched to specify different colors for light and dark modes:
graphic = Graphics[{DropShadowing[{-6, -6}, 2, LightDarkSwitched[RGBColor[1., 3/4, 0.], RGBColor[0., 2/3, 1.]]], Annulus[]}, PlotRangePadding -> 0.2];{LightModePane[graphic], DarkModePane[graphic]}Set the blur radius while using the default values for offset and color:
Graphics[{DropShadowing[Automatic, 0], Annulus[]}]This is equivalent to only giving the blur radius:
Graphics[{DropShadowing[0], Annulus[]}]Set the shadow color while using the default values for offset and blur:
Graphics[{DropShadowing[Automatic, Automatic, RGBColor[1., 1/3, 0.]], Annulus[]}]This is equivalent to only giving the color:
Graphics[{DropShadowing[RGBColor[1., 1/3, 0.]], Annulus[]}]The shadow offset and blur radius are specified in printer's points by default:
Graphics[{DropShadowing[{-25, -20}, 1], Disk[]}, PlotRange -> {{-4, 1}, {-3, 1.2}}, ImageSize -> #]& /@ {50, 100, 150}Use an ImageScaled offset and radius:
Graphics[{DropShadowing[ImageScaled[{-0.5, -0.4}], ImageScaled[0.01]], Disk[]}, PlotRange -> {{-4, 1}, {-3, 1.2}}, ImageSize -> #]& /@ {50, 100, 150}Applications (11)
Basic Applications (1)
Show the shadow offset and blur radius:
offsetblur[offset_, blur_ : 0] := Graphics[{{RGBColor[0., 2/3, 1.], Thick, Circle[Offset[offset], Offset[30]], Dashed, Circle[Offset[offset], Offset[30 + blur]]}, {DropShadowing[offset, blur], RGBColor[1., 3/4, 0.], EdgeForm[Black], Disk[{0, 0}, Offset[30]]}, Point[{{0, 0}, Offset[offset]}], Dashing[None], Line[{{0, 0}, Offset[offset]}]}]Offset the shadow to the right:
Table[offsetblur[{dx, 0}], {dx, {10, 20, 30}}]Blur the shadow using various radii:
Table[offsetblur[{0, 0}, r], {r, {0, 10, 16}}]Offset to the lower left with a large blur radius:
offsetblur[{-60, -30}, 20]Shadow Effects (3)
Simulate 3D depth in a 2D graphic:
Graphics[{LightGray, Disk[], DropShadowing[], Disk[{2, 0}]}]Larger values for the offset and blur radius correspond to greater depth:
Graphics[{LightGray, Table[{DropShadowing[{-2x, -x}, x], Disk[{x, 0}, 3 / 4]}, {x, 4}]}]Create a glow effect by using no offset with a large blur radius:
Graphics[{DropShadowing[{0, 0}, 16, Magenta], Text[Style["Glow", 64, FontFamily -> "Brush Script MT", White]]}, Background -> Black, AspectRatio -> 1 / 2]Approximate a thin outline by using multiple drop shadows:
Graphics[{Table[{DropShadowing[o, 1, Blue], Text[Style["Outline", 32, White]]}, {o, {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}}]}, AspectRatio -> 1 / 2]Graphics (3)
Apply drop shadow to graphics primitives:
Graphics[{DropShadowing[], #}]& /@ {Point[{{6, 3}, {0, 4}, {2, 0}, {3, 2}, {9, 5}}], BSplineCurve[{{3, 3}, {3, 4}, {2, 3}, {3, 2}, {4, 3}}], Polygon[{{3, 1}, {9, 8}, {0, 5}, {9, 3}, {4, 9}}]}Apply drop shadow to Text:
Graphics[{DropShadowing[], Text[Style["Shadow", 52, FontFamily -> "Brush Script MT"]]}]Apply drop shadow to a GraphicsComplex:
gc = GraphicsComplex[{...}, Polygon[...]];
Graphics[{DropShadowing[4], gc}, PlotRangePadding -> 30]Visualization (4)
Plot curves with drop shadows:
Plot[Sin[Sqrt[2] x] + Sin[x], {x, 0, 10}, PlotStyle -> DropShadowing[]]BarChart[{1, 2, 3, 4, 5}, ChartStyle -> DropShadowing[]]VectorPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, VectorStyle -> DropShadowing[]]ParametricPlot[r ^ 2 {Sqrt[t] Cos[t], Sin[t]}, {t, 0, 3 Pi / 2}, {r, 1, 2}, PlotStyle -> Directive[DropShadowing[], LightBlue, Opacity[1]]]Properties & Relations (2)
Drop shadow effects can also be produced using image processing functions:
{offset, radius, img} = {{-6, -6}, 6, [image]};ImageCompose[SetAlphaChannel[GaussianFilter[img, radius], 1 / 3], img, {0, 0}, offset]The equivalent effect using DropShadowing:
Graphics[{DropShadowing[offset, radius], ImageMesh[ColorNegate[RemoveAlphaChannel[img]], Method -> "MarchingSquares"]}, PlotRangePadding -> Scaled[.08]]Graphics primitives can be duplicated and offset using Offset to simulate an exact shadow:
Graphics[{Disk[], Opacity[1 / 3], Disk[Offset[{-8, -5}]]}, PlotRange -> 1.2]Graphics[{DropShadowing[{-8, -5}, 0], Disk[]}, PlotRange -> 1.2]Possible Issues (1)
Drop shadows are drawn in the order in which their corresponding objects are defined in Graphics:
regs = {Disk[], Disk[{1, 0}]};
Graphics[{DropShadowing[{-3, -3}, 2, Gray], LightGray, regs}]Interactive Examples (1)
Neat Examples (2)
Add depth to overlapping polygons:
With[{d = 2 Pi / 12}, Graphics[{DropShadowing[{0, 0}, 4, Black], Table[{Hue[(-11 + q + 10 r) / 72], Polygon[{(8 - r) {Cos[d (q - 1)], Sin[d (q - 1)]}, (8 - r) {Cos[d (q + 1)], Sin[d (q + 1)]}, (10 - r) {Cos[d q], Sin[d q]}}]}, {r, 6}, {q, 12}]}]]Create an animation of text hovering off the page:
Animate[
DynamicModule[{t, chars},
chars = Characters["Drop Shadow"];
Graphics[{Table[t = Max[0, 1 - Abs[i - Length[chars] * x] ^ 2];{DropShadowing[{0, -8t}, (2t) ^ 2], Text[Style[chars[[i]], 42, Bold], {i, 0.2t}]}, {i, Length[chars]}]}, ImageSize -> Medium, PlotRange -> {{0, Length[chars] + 1}, {-1, 1}}]
],
{x, 0, 1}
]Related Guides
History
Text
Wolfram Research (2022), DropShadowing, Wolfram Language function, https://reference.wolfram.com/language/ref/DropShadowing.html.
CMS
Wolfram Language. 2022. "DropShadowing." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DropShadowing.html.
APA
Wolfram Language. (2022). DropShadowing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DropShadowing.html
BibTeX
@misc{reference.wolfram_2026_dropshadowing, author="Wolfram Research", title="{DropShadowing}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/DropShadowing.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_dropshadowing, organization={Wolfram Research}, title={DropShadowing}, year={2022}, url={https://reference.wolfram.com/language/ref/DropShadowing.html}, note=[Accessed: 12-June-2026]}