By assigning points on the complex plane to different colors and brightness, domain coloring allows for a function from the complex plane to itself — whose graph would normally require four spatial dimensions — to be easily represented and understood.
A graph of a real function can be drawn in two dimensions because there are two represented variables,
One way to achieve that is with a Riemann surface, but another method is by domain coloring.
The term "domain coloring" was coined by Frank Farris, possibly around 1998.
[1][2] There were many earlier uses of color to visualize complex functions, typically mapping argument (phase) to hue.
[5] The technique of using continuous color to map points from domain to codomain or image plane was used in 1999 by George Abdo and Paul Godfrey[6] and colored grids were used in graphics by Doug Arnold that he dates to 1997.
[7] Representing a four dimensional complex mapping with only two variables is undesirable, as methods like projections can result in a loss of information.
However, it is possible to add variables that keep the four-dimensional process without requiring a visualization of four dimensions.
In this case, the two added variables are visual inputs such as color and brightness because they are naturally two variables easily processed and distinguished by the human eye.
, (also known as "phase" or "angle") with a hue following the color wheel, and the magnitude by other means, such as brightness or saturation.
The following example colors the origin in black, 1 in green, −1 in magenta, and a point at infinity in white:
This approach uses the HSL (hue, saturation, lightness) color model.
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: green, cyan, blue, magenta, red, and yellow.
Since the HSL color space is not perceptually uniform, one can see 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.
Many color graphs have discontinuities, where instead of evenly changing brightness and color, it suddenly changes, even when the function itself is still smooth.
This is done for a variety of reasons such as showing more detail or highlighting certain aspects of a function, like level sets.
Therefore, in functions that have large ranges of magnitude, changes in magnitude can sometimes be hard to differentiate when a very large change is also pictured in the graph.
This can be remedied with a discontinuous color function which shows a repeating brightness pattern for the magnitude based on a given equation.
A similar color function has been used for the graph on top of the article.
For instance, a graph may, instead of showing the color cyan, jump from green to blue.
This causes a discontinuity that is easy to spot, and can highlight lines such as where the argument is zero.