delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/06/14:51:19

Date: Thu, 6 Apr 2000 13:35:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Robin Johnson <robbat2 AT home DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Text Colors
In-Reply-To: <38EC3515.B1B13DF7@home.com>
Message-ID: <Pine.SUN.3.91.1000406133340.3003N-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 6 Apr 2000, Robin Johnson wrote:

> In a few old demos, I have seen the color of the text in textmode changed from
> the default 16 colors, from eg, to 15 shades of green, any comments on how to
> accomplish this in DJGPP?

You need to reprogram your VGA to use a different color palette.  Each of 
the 16 colors is actually an index into a table used by VGA to fetch the 
actual color; you need to change that table.

There are BIOS functions to reprogram VGA as explained above.  DJGPP 
doesn't provide library function for that, so you will need to call 
__dpmi_int directly.

I would imagine that Allegro and GRX have functions to do that.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019