# Color wheel graphs of complex functions

In mathematics, a complex function is a function with the complex numbers (see the imaginary numbers and the complex plane) as both its domain and codomain. The complex color wheel method assigns a color to each point of the complex plane.

## Methods

HL plot of z, as per the first definition in the text: the origin is black, −1 is red, 1 is cyan, and a point at infinity is white
Color wheel graph of complex function sin 1/z (according to the second definition). Black parts inside refer to numbers having large absolute values. This function has an essential singularity at z = 0.
A graph of the complex logarithm using a different coloring method. Here, red is 1, cyan is -1. Brightness represents magnitude, with white at infinity

The assignment of color to complex point could be diverse, but often one of the following two:

• the origin is black, −1 is red, 1 is cyan, and a point at infinity is white:
{\displaystyle {\begin{aligned}H&=\pi +\arg z,\\L&=\left(1-2^{-\left|z\right|}\right)\times 100\%,\\S&=100\%.\end{aligned}}}
• the origin is white, 1 is red, −1 is cyan, and a point at infinity is black:
{\displaystyle {\begin{aligned}H&=\arg z,\\L&=2^{-\left|z\right|}\times 100\%,\\S&=100\%.\end{aligned}}}

More precisely, the argument (angle) of the complex number defines the hue value while the modulus defines the light value of the color in the HLS (hue, lightness, saturation) color model; for a given (H,L) pair we choose the maximal saturation value. In both assignments, vivid colors of the rainbow are rotating in a continuous way on the complex unit circle, so the sixth roots of unity (starting with 1) are, according to the second definition: red, yellow, green, cyan, blue, and magenta. In addition, it is common in the assignments that the gradations of colors belonging to two complex numbers close to each other are close to each other, and that colors of complex numbers of the same argument are gradations of the same color – the one which has greater absolute value is lighter (according to the first definition) or darker (according to the second definition).

However, the HSL color space is not perceptually uniform, leading to streaks of perceived brightness at yellow, cyan, and magenta (even though their absolute values are the same as red, green, and blue) and a halo around L = 1/2. Use of the Lab color space corrects this, making the images more accurate, but also makes them more drab/pastel.[1]

To make images comparable, it is highly recommended to use the standardised color schemes of the Digital Library of Mathematical Functions.[2]

## History

The color wheel method was probably first used in publication in the late 1980s by Larry Crone and Hans Lundmark.[3]