Project

General

Profile

Change colors in colorized output?

Added by Matt Thompson over 3 years ago

All,

Random question. Is there a way to change the colors used for CDO's colorized output (less changing source code)? The main issue is that on my dark background terminal the blue is a bit hard for me to see. I'd love to change that to a teal or cyan or other more constrasting color.

Thanks,
Matt


Replies (5)

RE: Change colors in colorized output? - Added by Karin Meier-Fleischer over 3 years ago

Hi Matthew,

you can use another e.g. RGB color table with

cdo grfill,RGB="TRUE",colourtable="cols.rgb" ifile ofile

the RGB color cols.rgb:

6
RGB(0.0;0.0;1.0)
RGB(0.0;0.0;0.5)
RGB(0.0;0.5;0.5)
RGB(0.0;1.0;0.0)
RGB(0.5;0.5;0.0)
RGB(1.0;0.0;0.0)

You can get more information with

cdo -h grfill

-Karin

RE: Change colors in colorized output? - Added by Ralf Mueller over 3 years ago

hi Matthew!

you can check the values for the '-C' option with your terminal: no,auto,all

For me colors change with the color-palette I use for the terminal emulator (in my case it is 'terminator')

hth
ra;lf

RE: Change colors in colorized output? - Added by Karin Meier-Fleischer over 3 years ago

Ah, sorry I was on the wrong track, of course I thought about plotting. :)

RE: Change colors in colorized output? - Added by Matt Thompson over 3 years ago

Ralf,

I did see -C and have started using that to turn off the colors. But it's interesting it responds to your emulator.

Do you know what environment variable (maybe?) might affect it?

Or, I suppose, is there a CDO_XXX environment variable I could use to disable colors if I can't figure out how to get the terminal to change them? (I suppose I could alias cdo to 'cdo -C no' as well).

Matt

RE: Change colors in colorized output? - Added by Ralf Mueller over 3 years ago

yh, an alias to

cdo -C no
is what you need to set up. no environment variable afaik

cheers
ralf

    (1-5/5)