This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Add-ons & Links / Standard Packages / Graphics /

Graphics`ArgColors`

There are several ways to specify a complex number. The simplest is to give its real and imaginary parts. You can also use polar coordinates and specify the complex number by an angle, called the argument, and a length, called the absolute value or norm. Thus, the complex number is equal to Abs[z] Exp[I Arg[z]].

The functions ArgColor, ArgShade, and ColorCircle provided in this package are enhanced graphics directives. ArgColor and ArgShade allow you to specify the color or gray level of graphics elements using the argument of a complex number. ColorCircle[r] treats cyclically, but with a period of instead of . It begins with red and runs through the spectrum, blending the high end back into red.

Colors and gray levels using the arguments of complex numbers.

This loads the package.

In[1]:= <<Graphics`ArgColors`

The values of this function are points on the unit circle.

In[2]:= un[k_] := Exp[2 Pi I k / 10]

For numbers near the negative axis, ArgShade gives a low gray level. The shade grows darker as you move clockwise around the circle.

In[3]:= Show[Graphics[Table[
{ArgShade[un[j]],
Disk[{Re[un[j]], Im[un[j]]}, 0.2]},
{j, 10}], AspectRatio -> Automatic]]

Out[3]=