Graphics Mode

 BBS: Inland Empire Archive
Date: 03-18-92 (16:17)             Number: 140
From: SCOTT WUNSCH                 Refer#: NONE
  To: MARK KO                       Recvd: NO  
Subj: Graphics Mode                  Conf: (2) Quik_Bas
MK> How many colors can one access in Screen mode 13?
MK> I know there are at least 256. But is it true, there are
MK> actually 256,000 colors/?

  Sort of.  You can display 256 colours at one time.  However,
these colours can be any of 262,144 (256*1024).  To select
which of this vast "palette" of colours, you must use the
BASIC 'PALETTE' statment.  It allows you to specify the red,
green and blue values for each, giving the appearance of an
infinite palette.  The following is the syntax for the PALETTE
statement (VGA-only):

  PALETTE attr, red + (green * 256) + (blue * 65536)

  The variable 'attr' is one of the 256 'attributes' to
change.  'red', 'green', and 'blue' are the values to use in
the new colour, in a range of 0 to 63.  If you're putting the
red, green, and blue values in variable, it must be a long
                                  -= Scott \\'unsch =-

--- Maximus 2.00
 * Origin: The Green Zone - Regina, Sask, Canada (1:140/23)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET