Hue

Hue[h]

is a graphics directive which specifies that objects which follow are to be displayed, 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.

Details

  • Hue is also known as HSB (hue, saturation, and brightness) or HSV (hue, saturation, and value).
  • Hue corresponds to a cylindrical transformation of RGBColor, typically used for color picking, allowing for easier interpretation of color parameters.
  • 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. »
  • Hue[h] is equivalent to Hue[h,1,1]. »
  • On monochrome output devices, a gray level based on the brightness value is used.
  • ColorConvert can be used to convert Hue to other color spaces.
  • The alternative forms Hue[{h,s,b}] and Hue[{h,s,b,a}] can also be used. »
  • Style[expr,Hue[]] specifies that expr should be displayed with the specified color. »
  • For 3D surfaces, explicit Hue directives define surface colors; the final shading depends on lighting.
  • Glow[Hue[]] specifies color independent of lighting. »
  • Hue[h,s,b,a] is equivalent to Directive[Hue[h,s,b],Opacity[a]]. »
  • If no opacity has been specified, Hue[h,s,b] is equivalent to Hue[h,s,b,1].

Examples

open all close all

Basic Examples  (4)

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]=

Scope  (3)

Generalizations & Extensions  (3)

Applications  (8)

Properties & Relations  (1)

Possible Issues  (1)

Neat Examples  (3)

Introduced in 1991
(2.0)
|
Updated in 2007
(6.0)