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 >
Mathematica > Data Manipulation > Image Processing & Analysis > Color Processing > Colors >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Directives > Colors >

Hue

Hue[h]
is a graphics directive which specifies that objects which follow are to be displayed, if possible, in a color corresponding to hue h.
Hue[h, s, b]
specifies colors in terms of hue, saturation and brightness.
Hue[h, s, b, a]
specifies opacity a.
  • The parameters h, s, b and a must all be between 0 and 1. Values of s, b and a outside this range are clipped. Values of h outside this range are treated cyclically.  »
  • As h varies from 0 to 1, the color corresponding to Hue[h] runs through red, yellow, green, cyan, blue, magenta, and back to red again.  »
  • The alternative forms Hue[{h, s, b}] and Hue[{h, s, b, a}] can also be used.  »
  • On monochrome output devices, a gray level based on the brightness value is used.
  • For 3D surfaces, explicit Hue directives define surface colors; the final shading depends on lighting.
  • Glow[Hue[...]] specifies color independent of lighting.  »
  • In Hue[h, s, b, a], a is an "alpha channel" used to specify opacity.
  • If no opacity has been specified, Hue[h, s, b] is equivalent to Hue[h, s, b, 1].
  • Style[expr, Hue[...]] specifies that expr should be displayed with the specified color.  »
Specify the color of graphics primitives:
Specify the color with opacity:
Specify the output color of expressions:
Specify the color of plots:
Specify the color of graphics primitives:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the color with opacity:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the output color of expressions:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the color 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 Blend to mix two or more colors:
Use Lighter and Darker to mix with white and black respectively:
Hue[h] is equivalent to Hue[h, 1, 1]:
Hue[{h, s, b}] is equivalent to Hue[h, s, b]:
Use Opacity with Hue:
Use the opacity argument in Hue directly:
Select n complementary colors, by selecting them maximally apart on the color wheel:
Color the filling according to the argument of a complex function:
Color the surface according to the argument of a complex function:
The hue value is cyclic with period 1:
Saturation determines how vivid the color is:
Brightness determines the brightness of the color:
A portion of HSB color space with maximal brightness:
Saturation and brightness values outside of the 0, 1 range will be clipped:
In plot functions, use ColorFunctionScaling to control global scaling of variables:
Visualizing the HSB color space:
Dynamically view the color planes in the brightness direction:
HSB noise with opacity:
New in 2 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team