diff --git a/basic/palette.bas b/basic/palette.bas new file mode 100644 index 0000000..e20494b --- /dev/null +++ b/basic/palette.bas @@ -0,0 +1,28 @@ +10 REM DISPLAYS THE DEFAULT PALETTE +15 REM MOVE THE MOUSE TO SEE THE COLOR VALUE +20 DIM P$(15,15) +30 XS=10:YS=10 +40 SCREEN 128 +50 RECT 0,0,319,239,0 +60 C=0 +70 FOR Y=0 TO 15 +80 Y1=Y*YS:Y2=Y1+YS-1 +90 Y3=Y1+8 +100 FOR X=0 TO 15 +110 X1=X*XS:X2=X1+XS-1 +120 X3=X1 +130 RECT X1,Y1,X2,Y2,C +140 CX=$FA00+C*2 +150 C$=HEX$(VPEEK($1,CX))+HEX$(VPEEK($1,CX+1)) +170 P$(X,Y) = C$ +180 C=C+1 +190 NEXT +200 NEXT +210 MOUSE 1 +220 X=INT(MX/XS) +230 Y=INT(MY/YS) +240 IF X<0 OR X>15 THEN 220 +250 IF Y<0 OR Y>15 THEN 220 +260 LOCATE 21,9 +270 PRINT P$(X,Y) +280 GOTO 220