returns an image with values radially changing from center to corners based on gradient color gcol.


returns an image where the gradient starts at pos1 and ends at pos2.


returns a radial gradient image of the specified size.

Details and Options

  • RadialGradientImage constructs and returns a 2D or 3D image with constant radial gradient, with a center and radius specified with the input positions.
  • Color scheme specification gcol can be any of the following:
  • {col1,col2,}blend of multiple color directives coli
    ffunction f that returns a color based on a scalar distance
  • The argument passed to the function f is by default the normalized distance between a pixel and pos1.
  • Position specification posi can be any of the following:
  • {x,y} or {x,y,z}absolute pixel position
    Left,Right axis in 2D and 3D
    Bottom,Top axis in 2D, axis in 3D
    Front,Back axis in 3D
    Centercenter alignment
    {posx,}a list of named positions
  • Positions that are not constrained are taken to be centered.
  • By default, positions are assumed to be in the standard image coordinate system.
  • The size specification can be one of the following:
  • side2D image of size {side,side}
    {width,height}2D image size specification
    {width,depth,height}3D image size specification
  • The default size is {150,150} for 2D images and {64,64,64} for 3D images.
  • RadialGradientImage[] is equivalent to RadialGradientImage[{Black,White}].
  • LinearGradientImage accepts the following options:
  • ColorFunctionAutomatichow each pixel should be colored
    ColorFunctionScalingTruewhether to scale the argument to ColorFunction
    DataRangeFullrange of coordinates in the original image
    Padding"Fixed"padding scheme
  • Possible settings for DataRange include:
  • Automatic{{0,1},{0,h/w}} in 2D, {{0,1},{0,d/w},{0,h/w}} in 3D
    Full{{0,w},{0,h}} in 2D, {{0,1},{0,d},{0,h}} in 3D (default)
    {{left,right},{bottom,top}}explicit coordinate ranges in 2D
    {{left,right},{front,back},{bottom,top}}explicit coordinate ranges in 3D


open allclose all

Basic Examples  (3)

Create a grayscale radial gradient image:

Click for copyable input

Radial blend of colors from center to corners:

Click for copyable input

Radial gradient image centered at the bottom-left corner:

Click for copyable input

Scope  (13)

Options  (1)

Applications  (2)

See Also

LinearGradientImage  ConstantImage  RandomImage  Image  ColorData  GradientFilter

Introduced in 2014
| Updated in 2017