Table of Contents

Virtual Terminal Color

The following notes apply to virtual terminals such as /dev/tty1, /dev/tty2, etc.

You use these terminals when you log in without a display manager (eg. LightDM) or when you use a command such as <ctrl> + <alt> + <F2>.

These settings will not apply to a terminal emulator such as urxvt, st or xterm etc. They will need to to be configured separately.


Applying a VT Colorscheme at boot

The following instructions were created on Debian 10 (buster).

They should work on Ubuntu and other Debian based distributions as well.

Setting Up


Modify initramfs

Add the setvtrgb executable to the initramfs so that it's available during boot.


Choose a colorscheme

Test the colorscheme by running the script then clearing the terminal. This way you can see which one you like ahead of time.


Update initramfs

After completing the above steps, we will generate the new initramfs


Applying a VT Colorscheme after boot

If you use Plymouth, a display manager or frankly just don't care if the boot process terminal has custom colors, you can create a systemd service to load the colors after login.



VT Colorschemes

For the colorschemes below (except default), I imported the Xresources of each colorscheme to https://terminal.sexy to convert the hex values to rgb quickly. Then I created the files using those rgb values.

Default

Dracula

Gruvbox

Nord

Solarized


VT Colorscheme Format

setvtrgb requires the input to be formatted properly for it to work.

Similar to Xresources, there are definable 16 colors ranging from color0 through color15. However, the colors need split into 3 lines with Red being the top line, Green being the middle line and Blue being the bottom line. It should look like this (substituting the RGB values of course):

Red0,Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,Red11,Red12,Red13,Rew14,Red15
Green0,Green1,Green2,Green3,Green4,Green5,Green6,Green7,Green8,Green9,Green10,Green11,Green12,Green13,Rew14,Green15
Blue0,Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,Blue11,Blue12,Blue13,Rew14,Blue15


For a working example and/or to make a backup of the current settings:


Converting Hex Colors to RGB


References

Colors

General