7.18 Note on Helm grep

There is one face from the Helm package that is meant to highlight the matches of a grep or grep-like command (‘ag’ or ‘ripgrep’). It is helm-grep-match. However, this face can only apply when the user does not pass ‘--color=always’ as a command-line option for their command.

Here is the docstring for that face, which is defined in the helm-grep.el library (you can always visit the source code with M-x find-library).

Face used to highlight grep matches. Have no effect when grep backend use “–color=”

The user must either remove ‘--color’ from the flags passed to the grep function, or explicitly use ‘--color=never’ (or equivalent). Helm provides user-facing customization options for controlling the grep function’s parameters, such as helm-grep-default-command and helm-grep-git-grep-command.

When ‘--color=always’ is in effect, the grep output will use red text in bold letter forms to present the matching part in the list of candidates. That style still meets the contrast ratio target of >= 7:1 (accessibility standard WCAG AAA), because it draws the reference to ANSI color number 1 (red) from the already-supported array of ansi-color-names-vector.