How can I change the terminal line colors by commands?

In the current version of gnome-terminal you can't change background and color when starting a new terminal It used to be with these options: --background <color> and --foreground <color>

Now you can start your terminal specifying the profile:

gnome-terminal --window-with-profile <your profile>

You can also edit the current profile using gconftool. for instance, to edit colors of the Default profile:


gconftool-2 --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "#EEEEEEEEECEC"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#000000000000"

You might be interested in theme.sh. It is a self contained script which comes with a number of prepacked themes and can be used like so:

theme.sh <themename>