diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-01-27 23:51:56 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-01-27 23:51:56 +0000 |
commit | 6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1 (patch) | |
tree | 926065cf45450116098db664e3c61dced9e1f21a /ipl/gprogs/showcolr.icn | |
download | icon-upstream/9.4.3.tar.gz |
Initial upstream version 9.4.3upstream/9.4.3
Diffstat (limited to 'ipl/gprogs/showcolr.icn')
-rw-r--r-- | ipl/gprogs/showcolr.icn | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ipl/gprogs/showcolr.icn b/ipl/gprogs/showcolr.icn new file mode 100644 index 0000000..d41e6e2 --- /dev/null +++ b/ipl/gprogs/showcolr.icn @@ -0,0 +1,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 |