How can I change the standard 8 colors (16 if you count the bright versions) that are used in the various TTYs in Ubuntu 12.04? I'm not talking about the Terminal or XTerm applications, I'm talking about the TTYs that you access via Ctrl+Alt+F1 through Ctrl+Alt+F6.

I don't want to change what colors are being used in which places, I want to tweak what the colors look like. For example, I don't want to change what red is used for, I just want to change what the red looks like--such as using #FF6C60 as red instead of #FF0000.

  • Foreground & Background colors?
    – Mitch
    Jun 7, 2012 at 5:07
  • 1
    No, that's not what I want to change. I'm fine with the which colors are what, I just want to tweak how they look. For example, I'm fine with the color blue being used where the color blue is used--I just want to tweak the shade of blue the TTY uses.
    – Kerrick
    Jun 7, 2012 at 5:13

2 Answers 2


Finally found it! As it turns out, I was searching for the wrong term. Apparently the TTYs run on a framebuffer, which is what the colors get changed in.

From this blog post but customized to use the railscasts theme colors, add the following to ~/.bashrc:

if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0232323" #black
    echo -en "\e]P82B2B2B" #darkgrey
    echo -en "\e]P1D75F5F" #darkred
    echo -en "\e]P9E33636" #red
    echo -en "\e]P287AF5F" #darkgreen
    echo -en "\e]PA98E34D" #green
    echo -en "\e]P3D7AF87" #brown
    echo -en "\e]PBFFD75F" #yellow
    echo -en "\e]P48787AF" #darkblue
    echo -en "\e]PC7373C9" #blue
    echo -en "\e]P5BD53A5" #darkmagenta
    echo -en "\e]PDD633B2" #magenta
    echo -en "\e]P65FAFAF" #darkcyan
    echo -en "\e]PE44C9C9" #cyan
    echo -en "\e]P7E5E5E5" #lightgrey
    echo -en "\e]PFFFFFFF" #white
    clear #for background artifacting
  • 3
    Amazing. I'm just going to curl this page and remove everything but that code block. Thanks
    – Samie Bee
    Aug 20, 2019 at 3:42
  • THANK YOU you have saved my eyes.
    – detly
    May 13, 2020 at 0:45
  • i want the ubuntu native colors Dec 15, 2020 at 17:24
  • Is mandatory use the \e]P287AF5F format and not the "classic" #FF6C60 format? - I expected see in the second link a palette of colors working with the former format but is not available Apr 15, 2022 at 16:06

Ubuntu has a kbd package and in that, among many useful things, there's /sbin/setvtrgb.

It's truly awesome!

Sadly,in its manual no mention about /etc/vtrgb nor /etc/init/setvtrgb.conf file, other than that it's pretty straight forward.

Here's mine:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .