Thread: Colored Text

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    5

    Colored Text

    I am writing a Text-Based Parser Adventure Game in C and had a question.

    What I want is to display colored text. All of this will be from the command prompt using printf and whatnot I just want to be able to specify a color that certain text will be displayed in. How would I go about doing that? any help would be greatly appreciated

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Programs for microwaves and toasters can be coded in C. This operation is OS dependant, if it is even supported. Furthermore, this question is asked very frequently, I suggest searching the board before you ask.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Which OS / Compiler?

    For reasonably portable coloured text, use the ncurses library.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    5
    Thank you Salem for the help, I'll look up ncurses
    and thank you Tonto for being a douchebag

  5. #5

  6. #6
    Registered User
    Join Date
    Sep 2006
    Posts
    5
    problem solved, thank you very much sir

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to use FTP?
    By maxorator in forum C++ Programming
    Replies: 8
    Last Post: 11-04-2005, 03:17 PM
  2. Colored Text in C
    By colorC in forum C Programming
    Replies: 4
    Last Post: 02-23-2004, 04:58 AM
  3. how to cout colored text?
    By Guanhui in forum C++ Programming
    Replies: 1
    Last Post: 07-05-2002, 08:14 AM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. Colored Text
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 11-28-2001, 09:46 AM