PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training & Free Seminars
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
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
>
BUILT-IN MATHEMATICA SYMBOL
RGBColor
Hue
Lighter
Darker
Black
White
Gray
Raster
Opacity
Blend
Lighting
ColorSlider
ColorConvert
See Also »
|
Color Processing
Colors
Graphics Directives
More About »
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
.
MORE INFORMATION
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.
GrayLevel
is equivalent to
{GrayLevel[
g
],
Opacity
[
a
]}
.
»
If no opacity has been specified,
GrayLevel
[
g
]
is equivalent to
GrayLevel
.
Style
specifies that
expr
should be displayed with the specified gray level.
»
EXAMPLES
CLOSE ALL
Basic Examples
(4)
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]:=
Out[1]=
Specify the gray level with opacity:
In[1]:=
Out[1]=
Specify the output gray level of expressions:
In[1]:=
Out[1]=
Specify the gray level of plots:
In[1]:=
Out[1]=
Scope
(1)
Use diffuse surface color:
Use diffuse and specular surface color:
Use glow color, setting the diffuse surface color to black:
Generalizations & Extensions
(1)
Use
Opacity
with
GrayLevel
:
Use the opacity argument directly in
GrayLevel
:
Properties & Relations
(1)
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:
Possible Issues
(2)
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:
Neat Examples
(2)
Visualizing the gray level with opacity:
White noise with opacity:
SEE ALSO
RGBColor
Hue
Lighter
Darker
Black
White
Gray
Raster
Opacity
Blend
Lighting
ColorSlider
ColorConvert
MORE ABOUT
Color Processing
Colors
Graphics Directives
New in 1 | Last modified in 6