You are not logged in.

#1 2008-08-18 02:03:34

fflarex
Member
Registered: 2007-09-15
Posts: 466

help with color in terminals...

What does the color palette in gnome-terminal or xfce4's terminal actually do? I know that there are escape sequences for getting a specific color, and most every CLI app I've tried has settings for specific colors (as opposed to color1, color2, etc. as defined by that palette). I've only ever seen that palette affect vim and ls (although vim also has its own color scheme settings too, which I don't understand but doesn't matter that much either).

I never cared much about this until today when I decided to write a script with color output. So would anyone mind explaining?

I also wouldn't mind a link; Google has failed me... sad

Offline

#2 2008-09-16 23:16:45

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: help with color in terminals...

Wikipedia: ANSI_color and X11_color_names are good starting points. Also google on "(xterm|terminal) control sequences" and the like,

When you're in a 88-color or 256-color terminal, the first 16 colors are still reserved for the system colors (cyan, red, blue, brightcyan, brightred, etc.). The palettes you're mentioning change how those system colors are displayed. So if you want, you can change the shade of cyan or red displayed by programs that only have 16-color capability. You can even make the cyan code display orange, and so on.

Offline

#3 2008-09-17 01:55:43

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: help with color in terminals...

Yup, I have since figured this out through trial and error. One thing I have yet to figure out is how to use colors that aren't defined in those first 16. But I'll take a look at those Wikipedia articles.

Offline

Board footer

Powered by FluxBB