Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I use a color from 256-color template for screen's status bar items (hardstatus setting in .screenrc)? The screen manual (STRING ESCAPES section) only lists 10 colors to use for the status line.

share|improve this question
Screen by default only supports 8 bit colors, there's a batch that extends the color support to 256. But you should try tmux it supports 256 colors and, in my opinion, a superior alternative. – Ammar Alammar Jan 31 '12 at 19:55
up vote 1 down vote accepted

You can modify with termcapinfo command. Place the following code in your ~/.screenrc:

termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

This worked with

  • screen 4.1.0~201203
  • on Debian unstable amd64
  • with putty 0.61 on Windows, and
  • TERM is screen.

Someone says that you need more setting according to you setup. This blog post seems to be informative.

Hope this helps

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.