PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
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
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
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
SEARCH MATHEMATICA 8 DOCUMENTATION
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE
DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.
Mathematica
>
Visualization and Graphics
>
Graphics Options & Styling
>
Colors
>
Mathematica
>
Data Manipulation
>
Image Processing & Analysis
>
Color Processing
>
Colors
>
Mathematica
>
Visualization and Graphics
>
Symbolic Graphics Language
>
Graphics Directives
>
Colors
>
Built-in
Mathematica
Symbol
RGBColor
Hue
Lighter
Darker
Black
White
Gray
Raster
Opacity
Blend
Lighting
ColorSlider
See Also »
|
Color Processing
Colors
Graphics Directives
More About »
GrayLevel
GrayLevel
[
level
]
is a graphics directive which specifies the gray-level intensity with which objects that follow should be displayed.
GrayLevel
[
g
,
a
]
specifies opacity
a
.
MORE INFORMATION
The gray level must be a number between
0
and
1
.
»
0
represents black;
1
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
[
g
,
a
]
,
a
is an "alpha channel" used to specify opacity.
GrayLevel
[
g
,
a
]
is equivalent to
{GrayLevel[
g
],
Opacity
[
a
]}
.
»
If no opacity has been specified,
GrayLevel
[
g
]
is equivalent to
GrayLevel
[
g
, 1]
.
Style
[
expr
, GrayLevel[
...
]]
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
0, 1
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
MORE ABOUT
Color Processing
Colors
Graphics Directives
New in 1 | Last modified in 6