LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-16-2003, 03:04 PM   #1
cratos
Member
 
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
 
  


Reply


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 04:11 PM
Color depth of remote terminal BrainScanning Linux - Networking 2 09-13-2005 11:10 PM
Turning off terminal color highlight penguinco Fedora 1 12-08-2004 11:25 AM
Terminal font and color berkay Linux - Newbie 10 09-23-2004 02:19 AM
How to add color to ls in Slackware gnome-terminal? Onox Linux - Software 10 06-22-2003 09:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:58 AM.

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