Solution: /etc/grub.d/06_local_colors
The problem is that update-grub recreates your grub.cfg. The usual way to configure update-grub in Ubuntu is to edit /etc/default/grub, but unfortunately text colors are not yet supported.
We will use a lower level method: create a script in /etc/grub.d/ which will output the lines we want in the grub.cfg files. We use the name 06_local_colors
so that it will run after 05_debian_theme and override the color choices.
There are three easy steps.
Step 1. sudo editor /etc/grub.d/06_local_colors
Paste in this script:
#!/bin/sh
# /etc/grub.d/06_local_colors
# Override foreground/background colors with local admin's choices.
#
# Note: be sure to chmod +x this file or it will not be used.
# After editing this file, run update-grub.
set -e
echo "Overriding foreground/background text colors ($0)" >&2
echo "${1}set color_normal=light-gray/black"
echo "${1}set color_highlight=black/light-gray"
# Set these if you'd like the menu options to be different than other text
echo "${1}set menu_color_normal=light-gray/black"
echo "${1}set menu_color_highlight=black/light-gray"
# NOTES
# Colors: red, green, blue, cyan, magenta, brown, light-gray, black
#
# Foreground has additional colors available:
#
# light-red, light-green, light-blue
# light-cyan, light-magenta, yellow, white, dark-gray
# Text background of "black" is transparent when a background image exists.
# (GRUB_BACKGROUND in /etc/default/grub).
# To change the font face and size, set GRUB_FONT in /etc/default/grub
# to point to a .pf2 file crated by grub-mkfont.
#
# sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono24.pf2 --size=24 \
# /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
The script contains abundant notes so it should be quite simple to tweak.
Step 2: sudo chmod +x /etc/grub.d/06_local_colors
The file needs to be executable or it will not be used.
Step 3: sudo update-grub
After update completes successfully, simply reboot to see what your new colors look like in GRUB.
Further reading
Side note: Why not 05_debian_themes?
While it is possible to edit the system file 05_debian_theme
, as described in other answers, it is a bad idea. That file can may need to be overwritten when the system is updated.