summaryrefslogtreecommitdiff
path: root/ipl/gprogs/showcolr.icn
blob: d41e6e294dce122154c637fbac369cdcbee90902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
############################################################################
#
#	File:     showcolr.icn
#
#	Subject:  Program to list colors in Icon palettes
#
#	Author:   Ralph E. Griswold
#
#	Date:     March 14, 1995
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#  This program produces files of color specifications for all of Icon's
#  built-in palettes.  The output is written to a file whose base name is
#  the palette and whose suffix is ".clr".
#
############################################################################
#
#  Requires:  Version 9 graphics
#
############################################################################

procedure main()
   local palette, output

   every palette := ("c" || (1 to 6)) | ("g" || (2 to 256)) do {
      output := open(palette || ".clr", "w") |
         stop("*** cannot open output file for palette ", palette)
      every write(output, PaletteColor(palette, !PaletteChars(palette)))
      close(output)
      }

end