Add the --groups option

For color maps (like "rainbow"), iterate over matching groups in the pattern instead of over patterns.

Fix #4