Thread: colours!

  1. #1
    Unregistered
    Guest

    Talking colours!

    this is prob very simple but anyone know if and how to change the colour of text in c

  2. #2
    Unregistered
    Guest
    I'm using the Borland C++ v5.5 free compiler - in the <conio.h> header file there are functions for setting text and background colours, the declarations are:

    void textbackground(int colour), where colour is 0 - 7
    void textcolor(int colour), where colour is 0 - 15

    These will only work on text printed with functions using direct video output ie cprintf() and cputs(), again these functions are in conio.h, so if you haven't got that then I can't help..

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    perhaps it's in the faq... but set up a pointer to b800:0000 and, within that 32k (80x25x2) boundary you can do all you want with text... ixnay the library functions... but if you are using other text modes this might change... look up ralph brown's interrupt list for more information...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RGB Colours
    By rogster001 in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 04-22-2008, 12:56 PM
  2. Colours in DOS box
    By denizengt in forum Tech Board
    Replies: 1
    Last Post: 09-10-2003, 06:53 AM
  3. it's not colours
    By Skarr in forum Game Programming
    Replies: 0
    Last Post: 05-13-2003, 12:21 PM
  4. Changing Text/Background colours for window controls ...
    By Shag in forum Windows Programming
    Replies: 1
    Last Post: 11-16-2002, 11:57 AM
  5. Colours?
    By Fountain in forum C++ Programming
    Replies: 7
    Last Post: 01-29-2002, 03:41 PM