Color to Sound Converter
Convert any color to sound using scientific hue-to-frequency mapping. Hear colors through Web Audio synthesis with real-time playback.
About
Human vision perceives electromagnetic radiation between 380nm and 780nm. Sound occupies a separate physical domain - pressure waves from roughly 20Hz to 20,000Hz. No direct physical bridge exists between photon wavelength and acoustic frequency. This tool constructs one through logarithmic mapping: the HSL hue angle H (0° - 360°) drives an exponential interpolation across a three-octave piano range (130.8Hz to 1046.5Hz, C3 - C6). Saturation S modulates a low-pass filter cutoff, so desaturated greys sound muffled while vivid colors ring bright. Lightness L shapes amplitude - extremes near black or white fade toward silence, mirroring how those poles carry minimal chromatic information.
The mapping is a convention, not a law of physics. Scriabin, Newton, and Castel each proposed different color - pitch associations. This implementation uses logarithmic frequency spacing because human pitch perception is logarithmic (each octave doubles in frequency). The chord mode decomposes a color into its R, G, B channels and assigns each an independent oscillator, producing a three-note chord unique to every 24-bit color. Limitation: the audible result depends on your speakers and hearing range. Low-quality transducers may not reproduce bass frequencies below 200Hz accurately.
Formulas
The primary mapping converts HSL hue to audio frequency using logarithmic interpolation across a defined range:
Where fmin = 130.81 Hz (C3), fmax = 1046.50 Hz (C6), and H is the hue angle in degrees (0 - 360).
Saturation controls filter brightness through a low-pass cutoff frequency:
Where S ∈ [0, 1]. At zero saturation, the cutoff is 200 Hz (muffled). At full saturation, it reaches 8200 Hz (bright).
Lightness maps to gain with a parabolic envelope that silences extremes:
Where L ∈ [0, 1]. Maximum gain occurs at L = 0.5. At L = 0 (black) or L = 1 (white), gain drops to zero.
In chord mode, each RGB channel maps independently:
Same formula applies for fG and fB, producing three simultaneous oscillators. The ratio R ÷ 255 normalizes the 8-bit channel to [0, 1], then scales across two octaves per channel.
Reference Data
| Hue Range | Color | Approx. Frequency | Musical Note | Light Wavelength |
|---|---|---|---|---|
| 0° | Red | 130.8 Hz | C3 | 700 nm |
| 30° | Orange | 155.6 Hz | D♯3 | 620 nm |
| 60° | Yellow | 185.0 Hz | F♯3 | 580 nm |
| 90° | Chartreuse | 220.0 Hz | A3 | 560 nm |
| 120° | Green | 261.6 Hz | C4 | 530 nm |
| 150° | Spring Green | 311.1 Hz | D♯4 | 510 nm |
| 180° | Cyan | 370.0 Hz | F♯4 | 490 nm |
| 210° | Azure | 440.0 Hz | A4 | 480 nm |
| 240° | Blue | 523.3 Hz | C5 | 470 nm |
| 270° | Violet | 622.3 Hz | D♯5 | 450 nm |
| 300° | Magenta | 740.0 Hz | F♯5 | Non-spectral |
| 330° | Rose | 880.0 Hz | A5 | Non-spectral |
| 360° | Red (wrap) | 1046.5 Hz | C6 | 700 nm |
| Waveform Reference | ||||
| Sine | Pure tone, no harmonics. Clean and minimal. | |||
| Triangle | Odd harmonics only, falling at 1/n2. Soft, flute-like. | |||
| Sawtooth | All harmonics, falling at 1/n. Bright, buzzy, string-like. | |||
| Square | Odd harmonics only, falling at 1/n. Hollow, clarinet-like. | |||