Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Linux
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Linux General discussion of programming the various flavors of Linux operating systems.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Linux section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 23rd, 2003, 11:22 AM
Registered User
 
Join Date: Sep 2003
Location: KL, Selangor, Malaysia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to OzzyUltra Send a message via MSN to OzzyUltra
Default Font Color

HI,

People i have a little problem with programming on Linux. Right now I am using Kate on Linux for performing my programming needs. I need a to change the color of the font which appears on the standard output. I can't seem to find the header library associated with this particualr function. Please help me out.

its really appreciated:)
Ozzy

Reply With Quote
  #2 (permalink)  
Old October 22nd, 2004, 10:01 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

you can use \033[ <colour_number> m without the spaces eg:
echo -e "\033[42mThis is green\033[0m"

I knocked up a bit of perl to illustrate:

#!/usr/bin/perl

for (30..37,40..47) {
        print "\n" if ($_%10==0);
        print "\033[$_" . "m $_ \033[0m";
}
print "\n";

--
Don't Stand on your head - you'll get footprints in your hair. http://charlieharvey.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not enable textbox or combobox font color SabinoFonseca VB.NET 2002/2003 Basics 1 March 15th, 2007 01:52 PM
Cell/Font Color in DataGrid. su C# 1 December 3rd, 2006 04:58 AM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
change font color of label red pritz BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 0 November 14th, 2005 03:48 AM
font color, what different possibilites are phpsharma HTML Code Clinic 2 November 12th, 2003 06:44 AM



All times are GMT -4. The time now is 02:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.