Color wheel
The ring that arranges hues by angle, so you can find colors that go together by distance: neighbors are calm, opposites fight.
See it
What it is
The color wheel bends the spectrum into a loop so that the angle between two hues encodes their relationship. Newton worked out an early spectral color circle in the 1660s and published it in 'Opticks' in 1704. Zero degrees apart is the same hue, about 30 degrees is analogous (calm), 180 degrees is complementary (loud), 120 degrees is triadic (balanced). Every named color scheme is really just a shape drawn on this circle.
Reach for it the moment you need a second or third color and do not want to guess. Pick an anchor hue, step around by a fixed number of degrees, and you have a defensible starting set. In code this is one line of arithmetic on the hue channel, which is why hue rotation is the cheapest way to generate a whole family of themes.
Gotcha: there is more than one wheel and they disagree about 'opposite'. The artist's RYB wheel taught in art class puts red across from green and blue across from orange. The RGB/HSL wheel that CSS hue angles use puts red across from cyan and blue across from yellow. If a complementary pair from memory does not match hue + 180 in your code, that is why. And OKLCH is a third set of coordinates: its hue angles are perceptual, so 250 in OKLCH is not the same color as 250 in HSL and 'plus 180' in one space does not land on the same named complement as in the other. Name the space every time you do angle math. Second trap: the wheel says nothing about lightness, so a wheel-correct pair can still fail every contrast check you run.
Ask AI for it
Generate this color scheme by picking hue angles off the color wheel. Use the current primary color as the anchor; if none is supplied, use #4f46e5. Convert it to HSL and derive the rest by fixed angular offsets on that same RGB/HSL wheel, not the artist RYB wheel: 30 degrees for analogous, 180 for complementary, 150 and 210 for split-complementary, 120 and 240 for triadic. Label each color with the relationship and the offset it came from. Return every color as hex plus OKLCH, stating which space each number is in, and vary lightness across the set so no two picks sit at the same brightness.