internet time @ ???
tenpo ni li "???"

rnd's website |

linux framebuffer palette switching

Just like graphical terminals such as urxvt, the Linux framebuffer has an option to change the built-in palette. Distributions like Ubuntu use it to make the palette look nicer during bootup.

The escape sequence to do this is pretty simple:

ESC ] P # rrggbb

(without spaces) where ESC is the Escape code, # is the hexadecimal color number (from 0 to F) and rr, gg and bb are replaced with the hexadecimal RGB values respectively.

Here is a simple script that should be able to set the palette to one of the several different options:

The program doesn’t require root privileges, but it has to be executed in a framebuffer console directly, as opposed to a program like screen or tmux.