> The quantization formula ppmtopgm uses is g = .299 r + .587 g + .114 b.
Seriously. We can trust linux man pages to use the same 1-letter variable name for 2 different things in a tiny formula, can't we?