Skip to content

Commit

Permalink
Boost highs in spectral RGB color to improve visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jan 22, 2024
1 parent 3510bc6 commit 0d1faa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/waveform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0d1faa3

Please sign in to comment.