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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…