Customize option whitespace-display-mappings
. That's what it's for.
M-x customize-option whitespace-display-mappings RET
The doc gives you details (below), but just look at the Customize buffer and things will be even clearer. You can use C-u C-x =
with the cursor before a given character, to see its Unicode code point.
C-h v whitespace-display-mappings RET
Specify an alist of mappings for displaying characters.
Each element has the following form:
(KIND CHAR VECTOR...)
Where:
KIND is the kind of character.
It can be one of the following symbols:
tab-mark for TAB character
space-mark for SPACE or HARD SPACE character
newline-mark for NEWLINE character
CHAR is the character to be mapped.
VECTOR is a vector of characters to be displayed in place of CHAR.
The first display vector that can be displayed is used;
if no display vector for a mapping can be displayed, then
that character is displayed unmodified.
The NEWLINE character is displayed using the face given by
`whitespace-newline' variable.
Used when `whitespace-style' includes `tab-mark', `space-mark' or
`newline-mark'.
whitespace.el
and you'll see a few examples that are commented out as part of the variable Drew described in his answer below.M-x find-variable RET whitespace-display-mappings RET
You can add color also by customizing the face namedwhitespace-newline
.