Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-16-2003, 04:04 PM   #1
Registered: Feb 2003
Posts: 95

Rep: Reputation: 15
get terminal color?

When writing bash scripts I know you can change the color and background color so that you can make pretty pictures 'n things but when I go to change it back I use 'tput sgr0' and it changes the colors back to the origninal colors for the console, which is usually fine but if the user has change his colors after starting up, the script sets the wrong colors.
Is there a way to get the current background and foreground colors that are being used? You can save and restore cursor position so why cant you save and restore current colors?

Thank you


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal background color not working mijohnst Linux - Newbie 2 10-03-2005 05:11 PM
Color depth of remote terminal BrainScanning Linux - Networking 2 09-14-2005 12:10 AM
Turning off terminal color highlight penguinco Fedora 1 12-08-2004 12:25 PM
Terminal font and color berkay Linux - Newbie 10 09-23-2004 03:19 AM
How to add color to ls in Slackware gnome-terminal? Onox Linux - Software 10 06-22-2003 10:26 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration