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/gpacks/weaving/colrcvrt.icn | |
download | icon-6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1.tar.gz |
Initial upstream version 9.4.3upstream/9.4.3
Diffstat (limited to 'ipl/gpacks/weaving/colrcvrt.icn')
-rw-r--r-- | ipl/gpacks/weaving/colrcvrt.icn | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ipl/gpacks/weaving/colrcvrt.icn b/ipl/gpacks/weaving/colrcvrt.icn new file mode 100644 index 0000000..54f4ce2 --- /dev/null +++ b/ipl/gpacks/weaving/colrcvrt.icn @@ -0,0 +1,40 @@ +############################################################################ +# +# File: colrcvrt.icn +# +# Subject: Program to convert numerical color specifications +# +# Author: Ralph E. Griswold +# +# Date: February 10, 1999 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# AD HOC. Should be procedure. +# +############################################################################ +# +# Requires: +# +############################################################################ + +procedure main() + + range := 255 + + while color := read() do { + color ?:= { + r := tab(upto(',')) + move(1) + g := tab(upto(',')) + move(1) + b := tab(0) + } + write((r * range), ",", (g * range), ",", (b * range)) + } + +end |