home *** CD-ROM | disk | FTP | other *** search
- Super Color For the IBM Personal Computer
-
- Alan Metzger
- North Jersey IBM PC Club
-
- Everyone knows that only two color
- palettes are available in medium
- resolution graphics on the P.C.
- Right? Wrong!! If you use a
- television set or a composite monitor
- hooked up to a standard IBM
- Color/Graphics adapter, 20 different
- palettes can be yours. If you have
- an RGB monitor, you can have 22
- different palettes. The best news is
- that you don't have to be a
- professional programmer to use the
- palettes. If you can use the two
- standard palettes, the following
- instructions should get you the bonus
- palettes with no trouble.
-
- First, let me review the standard
- medium resolution palettes:
-
- SCREEN 1,0 'sets medium res graphics
- COLOR b,p 'chooses background color
- "b" amd palette "p"
-
- The COLOR statement in the IBM BASIC
- Manual states that the background
- color "b" is in the range of 0 to 15,
- and the colors available are:
-
- Color Palette 0 Palette 1
- 1 Green Cyan
- 2 Red Magenta
- 3 Brown White
-
- But there's more to it than that.
- Standard Palettes and "LIGHT"
- Standard Palettes
-
- If you look carefully, you will
- notice that when you switch from a
- background color between 0 and 7 to
- one between 8 and 15, not only the
- background changes to one of the
- "light" colors, but the palette
- colors also become "light", too. Try
- the following BASIC program to see
- the effect.
-
- 10 CLS 'clear the screen
- 20 SCREEN 1,0 'set medium res
- graphics mode
- 30 COLOR 1,1 'set blue background
- and palette CYAN/MAGENTA/WHITE
- 40 CIRCLE(80,100),30,1:PAINT
- (80,100),1: LOCATE 7,10:
- PRINT "1" 'Color #1
- 50 CIRCLE(160,100),30,2:PAINT
- (160,100),2: LOCATE 7,20:
- PRINT "2" 'Color #2
- 60 CIRCLE(240,100),30,3:PAINT
- (240,100),3: LOCATE 7,30:
- PRINT "3" 'Color #3
- 70 LOCATE 1,1
- 80 INPUT "ENTER BACKGROUND COLOR - "
- ,B
- 90 COLOR B 'use selected background
- 100 GOTO 40
- 110 END
-
- Run the program and enter 1 (blue).
- Then enter 9 (light blue). Look
- carefully at the circles as you
- toggle the colors. Try other colors.
-
- At this point some of you are
- probably saying "OK, but the whole
- screen gets 'light'". Try your
- program again, this time entering 1
- followed by 17. Same background but
- with a "light" palette.
-
- Here's the rule:
-
- BACKGROUND
- COLOR
-
- 0-7 dark
- Palette 0
- GREEN/RED/BROWN
- Palette 1
- CYAN/MAGENTA/WHITE
-
- 8-15 light
- Palette 0
- Lt.GREEN/Lt.RED/Lt.YELLOW
- Palette 1
- Lt.CYAN/Lt.MAGENTA/H.I.WHITE
-
- 16-23 dark
- Palette 0
- Lt.GREEN/Lt.RED/YELLOW
- Palette 1
- Lt.CYAN/Lt.MAGENTA/H.I.WHITE
-
- CYAN/RED/WHITE
-
- A third palette pair, CYAN/RED/WHITE,
- is available if you have an RGB
- monitor. This trick doesn't work on
- a television or composite monitor but
- results in a WHITE/WHITE/WHITE on
- WHITE palette.
-
- Insert the following line in your
- program:
-
- 35 OUT 984,14 'select CYAN/RED/WHITE
-
- NOTE: You can also get
- CYAN/RED/WHITE by using a SCREEN 1,2
- command in BASIC, but it also blanks
- the screen rather then merely
- changing palettes.
-
- To be certain that everything gets
- RESET back to normal, you can enter:
- SCREEN 0,0: SCREEN 1,0
-
- Six palettes down and sixteen to go.
-
- SIXTEEN "UNICHROME" PALETTES
-
- Sixteen additional "UNICHROME" or
- "several shades of one color hue"
- palettes also are available. These
- come with any background you want AS
- LONG AS YOU WANT BLACK. For some
- reason the TV/composite people really
- benefit here as can be seen in the
- color table below. Take an original
- program you wrote above and add the
- following line:
-
- 35 OUT 984,26 'set "UNICHROME"
- palette mode
- (Remember!!! OUT 984,10 sets it back
- to NORMAL)
-
- When you RUN the program you should
- see the palettes shown below. These
- palettes are on a black background
- only. Be careful! If you enter 0
- (BLACK) the palette is BLACK on
- BLACK. (#8 GRAY may also be very
- difficult to see if your RGB monitor
- is not adjusted correctly.)
-
- The palette is selected by:
-
- COLOR p 'select "UNICHROME" palette
-
- On an RGB monitor, the selected
- palette color(0-15) is palette color
- #3. Colors #1 and #2 appear to be
- one-half intensity versions of #3.
- Color #0 is BLACK, the background
- color.
-
- The colors seen on a TV or composite
- monitor will vary depending on the
- adjustment of the hue/tint and color
- controls. The colors given are those
- I see on my modular/television.
-
- UNICHROME PALETTES
- COLOR RGB Monitor
- 0 BLACK/BLACK/BLACK
- 1 DK.BLUE/DK.BLUE/BLUE
- 2 DK.GREEN/DK.GREEN/GREEN
- 3 DK.CYAN/DK.CYAN/CYAN
- 4 DK.RED/DK.RED/RED
- 5 DK.MAGENTA/DK.MAGENTA/MAGENTA
- 6 DK.BROWN/DK.BROWN/BROWN
- 7 GRAY/GRAY/WHITE
- 8 DK.GRAY/DK.GRAY/GRAY
- 9 BLUE/BLUE/LT.BLUE
- 10 GREEN/GREEN/LT.GREEN
- 11 CYAN/CYAN/LT.CYAN
- 12 RED/RED/LT.RED
- 13 MAGENTA/MAGENTA/LT.MAGENTA
- 14 DK.YELLOW/DK.YELLOW/YELLOW
- 15 WHITE/WHITE/BRT.WHITE
-
-
- COLOR TV/Composite Color Monitor
- 0 BLACK/BLACK/BLACK
- 1 DK.MAGENTA/DK.BLUE/BLUE
- 2 MED.GREEN/DK.GREEN/BRT.GREEN
- 3 MED.GREEN/DK.BLUE/CYAN
- 4 DK.MAGENTA/DK.RED/RED
- 5 DK.MAGENTA/DK.BLUE/MAGENTA
- 6 DK.GREEN.DK.RED/BROWN
- 7 DK.GREEN/DK.BROWN/WHITE
- 8 DK.GRAY/DK.GRAY/GRAY
- 9 LIGHTER VERSION OF 1 ABOVE
- 10 LIGHTER VERSION OF 2 ABOVE
- 11 LIGHTER VERSION OF 3 ABOVE
- 12 LIGHTER VERSION OF 4 ABOVE
- 13 LIGHTER VERSION OF 5 ABOVE
- 14 PALE GREEN/PALE RED/YELLOW
- 15 WHITE/WHITE/BRT.WHITE
-
- It should be noted that the RGB
- colors 1 and 2 in palettes 9 thru 13
- above are not the same as color 3 in
- palettes 1 thru 5 respectively. They
- actually appear as half intensity
- paler out versions of palettes 1 thru
- 5 color 3.
-
- That's it folks. Twenty two all
- different palettes. If you find any
- more, share the news and mention it
- to the editor.