More “Colors” in QL’s Mode 4

Author(s): Paul Bingham
Pub Details: Time Designs Magazine v3 n2 (Volume 3, Issue 2)
Date: January/February 1987
Pages: 9
Monitor displaying a QL screen
Monitor displaying a QL screen

Anyone who has a QL and a monitor that will display the mode 4 (F1) screen might be wishing that there was more than four colors; i.e., white black, green and red. If one experiments with the PAPER command he finds that it can provide a stipple function for “blending” colors. Alternating red and white pixels yields a textured pink screen, green and red gives brown and so on.

This short program lets the user pick one of the four pixel patern alternatives then displays labeled overlapping windows of sixteen new “colors”. An input window in the lower left allows choices for testing any window or changing the pattern. A small window in the upper right lists the colors and number values and a larger window tests the chosen “color” by printing over it with letters of different sizes and colors. This will reveal that some new pixel-produced “colors” are not suited to certain types of print, while others look just fine.

Refering to the User’s Manual while using the COLOR EDITOR will be of value. By altering the window parameters in lines 10, 40, 80, 100 and 200, they offset values in line 50 (and a few other minor changes)…this could also serve as a color editor for mode 8.

5 REMark       MODE 4 COLOR EDITOR
10 INK 7:PAPER 0:a=2:z=2:u=2:i=0:WINDOW 512,256,0,0
20 MODE 4:CLS:CSIZE 0,0:AT 0,25
25 INPUT "STIPPLE 0,1,2,or 3? ";s:INK 0:CLS:b=0:f=32
30 FOR d=0 TO 6 STEP 2
35 FOR c=0 TO 6 STEP 2
40 WINDOW 118,60,f,b:PAPER c,d,s:CLS:PRINT" ";
45 PAPER 7:PRINT " PAPER ";c;",";d;",";s;" "
50 b=b+9:f=f+21:END FOR c:END FOR d
60 AT 5,5:PRINT "Stipple: ";s:CSIZE 2,0
70 AT 2,2:PRINT "MODE 4":AT 3,1:PRINT "COLORS'"
80 WINDOW 77,32,265,0:PAPER 6:CLS
85 CSIZE 0,0:FOR c=0 TO 6 STEP 2
90 PAPER 6:PRINT " ink ";c;": ";
95 PAPER c:PRINT " ":NEXT c:GO SUB 100:GO TO 155
100 WINDOW 97,87,350,0:PAPER a,z,u:INK 0:CLS:PRINT
105 CSIZE 2,0:PRINT "PA";:INK 6:PRINT "TE";:INK 4
110 PRINT "RN";:INK 2:PRINT "S:":FOR t=0 TO 3
115 y$=" '":IF t=1:y$="..":GO TO 130
120 IF t=2:y$=": ":GO TO 130
125 IF t=3:y$="'."
130 CSIZE 0,0:PRINT:INK i:PRINT " Stipple ";
140 INK 0:PRINT t;"= ";:PAPER 4:PRINT y$:PAPER a,z,u
150 i=i+2:INK i:END FOR t:i=0:RETurn
155 GO SUB 200:CLS:AT 1,1:INPUT "PAPER _";a:AT 1,9
160 INPUT ",_";z:AT 1,12:INPUT ",_";u:CLS
170 AT 1,1:PRINT " PAPER ";a;",";z;",";u:GO SUB 100
175 GO SUB 200:AT 2,2:INPUT "new color? (y/n)";n$
180 IF n$="y" OR n$="":GO TO 155
185 GO SUB 200:AT 2,2:INPUT "new stipple? (y/n)";n$
190 IF n$="y" OR n$="":RUN
195 CLS:AT 2,3:PRINT "program ended.":STOP
200 WINDOW 132,32,30,128:PAPER 6:INK 0:RETurn

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.