When encoding to webm (specifically VP8, i.e. libvpx), the color range gets reduced from 0-255 to 15-235. This causes a washed-out look; blacks become faded and not as sharp.
I have found solutions to this problem for mp4, but can't find one for webm. (With an mp4, you can add
-pix_fmt yuvj420p. I have tested that and it works for mp4. However, libvpx does not recognize this option.)
The command I'm using is
ffmpeg -i in.avi -c:v libvpx -crf 8 -b:v 5M -an out.webm
Update: while the below comment fixed the problem for me, I've noticed that browsers seem to do some of their own color conversion when displaying video. It looks like they do a TV->PC conversion, eliminating a lot of the washed-out look of video. Possibly they do this to account for the fact that most video is in the clipped range. When playing my improved version, the blacks look overly dark, and I prefer the original version.
But when played in VLC, the improved version shows the full color range I wanted. So I think whether you use this technique depends on where the intend the video to be played. In VLC I would; in a browser, I wouldn't.