Comment 3 for bug 817686

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I'm using the following for now:

hostname | md5sum | head -c 4 | awk --non-decimal-data '{print ("0x"$1)%255}'

So operate on the system's hostname, md5sum it, take the first 4 characters, and mod it by 255. This should give a per-hostname color between 0 and 255 for the background color.

Note that screen only supports 16 colors here, while tmux supports a full 255.