Paint me a Rainbow

colors, language-agnostic, rgb

Solution

Use HSL instead: fix the brightness and saturation and vary the hue from 0 to 360, then convert to RGB.

HSL describes colors as they are perceived by people. RGB describes them as they are used by machines. So you can't really do anything visually pleasing directly using RGB.

Problem

How would you go about making a range of RGB colours evenly spaced over the spectral colour range? So as to look like a real rainbow.

Original source

Related problems