bbc / peaks.js

JavaScript UI component for interacting with audio waveforms
https://waveform.prototyping.bbc.co.uk
GNU Lesser General Public License v3.0
3.2k stars 279 forks source link

Playhead text background color #507

Closed amber-huo closed 11 months ago

amber-huo commented 1 year ago

Hi, I would like to be able to customize a background/highlighted color to the playhead text. If the waveform and playhead text happen to be similarly colored, the text doesn't show up very well when it overlaps high amplitude areas. So it's for better color contrast/generally more visible text. Something like: image

chrisn commented 1 year ago

Thanks for this suggestion. It sounds good, we could add an option for the background color and possibly also for padding around the text.

amber-huo commented 1 year ago

Thanks @chrisn, I opened a PR for both background color and padding around the text, like so: image

chrisn commented 11 months ago

Your PR is now merged. Thanks again for contributing! 🙏

chrisn commented 11 months ago

@amber-huo I have just released v3.2.0 which includes your PR.