For a plot I want to represent two periodic angles with a single color. Theoretically this is possible, since a torus (think Doughnut, any surface point of which can be described via two angles) can be embedded into the RGB cube. My question is though, has someone already come up with a colorspace such that for a fixed third coordinate it is highly unlikely to mistake one combination of two angles for another one?

For visualization, here's the Wikipedia image from Toroidal coordinates

One angle φ describes the yellow plane's orientation, the other angle would be the polar angle on the circle from the intersection of that yellow plane with the blue torus. (Please ignore the red sphere which is for another coordinate (σ) that is not periodic.)

  • Don't color spaces always need to be pointy? You must have a totally-black and a totally-white point somewhere. See for example the double-cone RGB model.
    – Jongware
    Dec 16, 2018 at 18:44
  • @usr2564301 Good point. To get the full color space a third coordinate (e.g. the τ in the Toroidal coordinates) is required. I'm actually interested in a subset with the third coordinate fixed though, let me adapt the title a bit... Dec 17, 2018 at 10:00

3 Answers 3


Humans as a general rule can not remember associations individual colors very well. As far as most humans are concerned its like there are about 6 to 10 colors only. Which those colors are and what they are called is another thing altogether (for a humorous nerdm scientific look at the subject see XKCD color survey results).

That said humans are good at spotting color differences if you have the colors side by side. This means that if you have a 2 to 3 color gradient then humans can spot more or less the weight correctly just as long as either the scales are visible or theres enough samples to compare. So since you in fact have a 2d space you could try to use a four corner gradient for the job.

Just remember people need their memory jogged as to what that means.

  • Basically I agree with the four corner gradient. The only additional requirement the angles impose is the periodicity along both directions, which is where I haven't found a good example so far Dec 16, 2018 at 17:46

In general, how to represent a torus using two polar coordinates is beyond my understanding but here I go.

I don't know if that would qualify as color space; it could be a color solid in any case but I doubt it would be a useful one.

I can think of a lot of uses of color solids. Some are theoretical, some are just plain practical.

A color solid value must mean something. Normally it is a 3 coordinate system, either XYZ (for example on an RGB one) or one radial which has 2 components (Hue and saturation) and one linear (brightness or lightness), which makes 3.

What the 4th one would be for?

Besides that, how do you solve a color transition from one side of the donut to the other?

You are forced to do twists, and turns... I do not see it very practical.


For x and y the coordinates on the torus (0 to 1), try

hue = x,

saturation = 1,

value = (1+cos(2*pi*y))/2

It is double valued, but looks pretty cool.

enter image description here

  • Thanks, it looks nice indeed, but did you have a look at a cross section? You'll get two circles and from what I've checked so far it's difficult to distinguish the "inner" and "outer" parts of them, or depending on the radius also between the neighbouring inner points Feb 25, 2019 at 7:21
  • That's right - it is double valued in the sense that you get the same color for y or 1-y, i.e. the inner or outer part of the circle. You could get something unique with hue = x, saturation = (1+sin(2*piy))/2, value = (1+cos(2*piy))/2 However I didn't find that as nice.
    – neuromath
    Mar 4, 2019 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.