From 0d1faa3ae4999a0966e6bfc730dd512d1968b3d3 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Mon, 22 Jan 2024 01:34:16 +0100 Subject: [PATCH] Boost highs in spectral RGB color to improve visibility --- src/waveform.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/waveform.rs b/src/waveform.rs index e4e5075..5f3441a 100644 --- a/src/waveform.rs +++ b/src/waveform.rs @@ -73,7 +73,8 @@ impl FilteredWaveformVal { let all = all.to_f32(); let low = low.to_f32(); let mid = mid.to_f32(); - let high = high.to_f32(); + // Boost highs to improve visibility + let high = (1.0 + high.to_f32()).log2(); // The `all` value is needed to control the brightness of the resulting color. // Otherwise we would only reach the edges of the RGB space with one component // always maxed out.