Improve module coloring. Closes #377.