Dave's Brain

Browse - Computer Tips - How can I get many colors in my terminal window ?

Date: 2017jan24

Q.  How can I get many colors in my terminal window ?

A.  I use a Windows terminal program to a Linux console.

** 256 colors **

In the bash console do:

tput colors
You'll probably get 8. Simply do:
export TERM=xterm-256color
(You can add this to your ~/.bashrc or /etc/bashrc file) And retry:
tput colors
And you'll get 256. Nice. Most terminal emulators handle 256 colors. For example putty on Windows works. vim and several other programs support 256 colors so you are good to go. ** true color (16 million colors) ** I used the terminal program in cygwin it seems I have true color. More testing is required. For true color (16 millions colors) see here: https://gist.github.com/XVilka/8346728

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.