Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Graphics Options & Styling > Colors > GrayLevel >
Mathematica > Data Manipulation > Image Processing & Analysis > Color Processing > Colors > GrayLevel >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Directives > Colors > GrayLevel >

GrayLevel

GrayLevel[level]
is a graphics directive that specifies the gray-level intensity with which objects that follow should be displayed.
GrayLevel
specifies opacity a.
  • The gray level must be a number between and . »
  • represents black; represents white.
  • On display devices with no native gray-level capability, dither patterns are typically used.
  • For 3D surfaces, explicit GrayLevel directives define surface colors; the final shading depends on lighting.
  • In GrayLevel, a is an "alpha channel" used to specify opacity.
  • Style specifies that expr should be displayed with the specified gray level. »
Specify the gray level of graphics primitives:
Specify the gray level with opacity:
Specify the output gray level of expressions:
Specify the gray level of plots:
Specify the gray level of graphics primitives:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the gray level with opacity:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the output gray level of expressions:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the gray level of plots:
In[1]:=
Click for copyable input
Out[1]=
Use diffuse surface color:
Use diffuse and specular surface color:
Use glow color, setting the diffuse surface color to black:
Use Opacity with GrayLevel:
Use the opacity argument directly in GrayLevel:
GrayLevel of RGBColor can be computed in the following way:
From this formula we see that many colors will produce the same gray level G:
Use a color function in the RGB color space:
The corresponding gray-level colors:
Gray-level values outside of the range will be clipped:
The actual surface color depends on the colors of lights in 3D:
The default 3D lights contain several colored light sources:
Visualizing the gray level with opacity:
White noise with opacity:
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF