home *** CD-ROM | disk | FTP | other *** search
- /* SavePageColors - saves the current color set as RGB triplets in the file
- ram:colors. All 16 colors available are saved even if the page uses a
- smaller palette. This is done by modifying the display before reading
- the colors, then changing it back afterwards.
- */
-
- if open(outfile, 'ram:colors', 'write') then do
- n = getpagecolors(':')
- call setpagecolors(':',16)
-
- do i = 0 to 15
- call writeln(outfile, '$' || right(d2x(getpagergb(':',i)),4,'0'))
- end
-
- end
-
- call setpagecolors(':',n)
- say 'Done!'
-