What happened, and what did you expect to happen?

Not all terminal color schemes will yield readable text when combining different ANSI colors as foreground and background, in this case magenta and white. Instead, when using any ANSI color as background, set it as foreground+reversed, such that it is combined with the default background. This will be more or less guaranteed to give a readable result for all colorschemes.
Output of "elvish -version"
0.22.0-dev.0.20250425174858-9db96db5f479
Code of Conduct