Color Wheel Generator
Interactive color wheel generator with harmony modes. Pick colors, generate palettes (complementary, triadic, analogous), and export HEX/RGB/HSL values.
About
Color selection without a systematic approach leads to palettes that clash, reduce readability, and violate accessibility contrast ratios (WCAG 2.1 requires a minimum contrast ratio of 4.5:1 for normal text). This tool computes color harmonies by calculating angular offsets on the HSL color wheel. A complementary pair sits at 180° separation. A triadic set distributes three hues at 120° intervals. The generator converts between HSL, RGB, and HEX in real time using standard colorimetry formulas. Results approximate display output; actual appearance depends on monitor calibration and color profile (sRGB assumed).
Formulas
The HSL-to-RGB conversion transforms a hue angle H ∈ [0, 360], saturation S ∈ [0, 1], and lightness L ∈ [0, 1] into RGB channels.
The intermediate values (R′, G′, B′) are selected based on which 60° sector H falls into. Final channels: R = (R′ + m) × 255.
Harmony offsets are computed by adding angular displacements to the base hue:
Where Δn is the offset angle for harmony type (e.g., 180° for complementary). Relative luminance for contrast ratio uses the sRGB linearization:
Where each channel is linearized: if c ≤ 0.04045, then clin = c12.92; otherwise clin = ((c + 0.055) ÷ 1.055)2.4.
Reference Data
| Harmony | Hue Offsets | Colors | Use Case |
|---|---|---|---|
| Complementary | 0°, 180° | 2 | High contrast, call-to-action buttons |
| Analogous | −30°, 0°, +30° | 3 | Harmonious themes, nature palettes |
| Triadic | 0°, 120°, 240° | 3 | Vibrant balanced designs |
| Split-Complementary | 0°, 150°, 210° | 3 | Softer contrast than complementary |
| Tetradic (Rectangle) | 0°, 60°, 180°, 240° | 4 | Rich palettes, requires balance |
| Square | 0°, 90°, 180°, 270° | 4 | Equal tension, dynamic layouts |
| Monochromatic | 0° (vary S/L) | 5 | Elegant, single-hue gradations |
| Double Complementary | 0°, 30°, 180°, 210° | 4 | Complex designs, dashboards |
| WCAG AA Normal Text | Contrast ≥ 4.5:1 | Body text readability | |
| WCAG AA Large Text | Contrast ≥ 3.0:1 | Headings ≥ 18pt | |
| WCAG AAA Normal Text | Contrast ≥ 7.0:1 | Maximum accessibility | |
| Red (Primary) | 0° | - | Urgency, energy, passion |
| Orange | 30° | - | Warmth, enthusiasm |
| Yellow | 60° | - | Optimism, attention |
| Green | 120° | - | Growth, safety, nature |
| Cyan | 180° | - | Calm, clarity, tech |
| Blue | 240° | - | Trust, professionalism |
| Purple | 270° | - | Luxury, creativity |
| Magenta | 300° | - | Innovation, playfulness |
| sRGB Gamut | Standard for web displays | Default color profile for CSS | |
| HSL Model | H: 0 - 360, S: 0 - 100, L: 0 - 100 | Perceptually intuitive model | |